A module to pull data from Foreman via its API into the Pillar dictionary
Set the following Salt config to setup Foreman as external pillar source:
ext_pillar: - foreman: key: foreman # Nest results within this key only: ['hostgroup_name', 'parameters'] # Add only these keys to pillar foreman.url: https://example.com/foreman_api foreman.user: username # default is admin foreman.password: password # default is changeme
The following options are optional:
foreman.api: apiversion # default is 2 (1 is not supported yet) foreman.verifyssl: False # default is True foreman.certfile: /etc/ssl/certs/mycert.pem # default is None foreman.keyfile: /etc/ssl/private/mykey.pem # default is None foreman.cafile: /etc/ssl/certs/mycert.ca.pem # default is None foreman.lookup_parameters: True # default is True
An alternative would be to use the Foreman modules integrating Salt features in the Smart Proxy and the webinterface.
Further information can be found on GitHub.
Read pillar data from Foreman via its API.
© 2019 SaltStack.
Licensed under the Apache License, Version 2.0.