theforeman.foreman.foreman – Sends events to Foreman

Note

This plugin is part of the theforeman.foreman collection (version 2.2.0).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install theforeman.foreman.

To use it in a playbook, specify: theforeman.foreman.foreman.

Synopsis

  • This callback will report facts and task events to Foreman

Requirements

The below requirements are needed on the local controller node that executes this callback.

  • whitelisting in configuration

  • requests (python library)

Parameters

Parameter

Comments

client_cert

aliases: ssl_cert

string

X509 certificate to authenticate to Foreman if https is used

Default: “/etc/foreman/client_cert.pem”

Configuration:

  • INI entries:

    [callback_foreman]
    ssl_cert = /etc/foreman/client_cert.pem
    
    [callback_foreman]
    client_cert = /etc/foreman/client_cert.pem
    
  • Environment variable: FOREMAN_SSL_CERT

client_key

aliases: ssl_key

string

the corresponding private key

Default: “/etc/foreman/client_key.pem”

Configuration:

  • INI entries:

    [callback_foreman]
    ssl_key = /etc/foreman/client_key.pem
    
    [callback_foreman]
    client_key = /etc/foreman/client_key.pem
    
  • Environment variable: FOREMAN_SSL_KEY

dir_store

string

When set, callback does not perform HTTP calls but stores results in a given directory.

For each report, new file in the form of SEQ_NO-hostname.json is created.

For each facts, new file in the form of SEQ_NO-hostname.json is created.

The value must be a valid directory.

This is meant for debugging and testing purposes.

When set to blank (default) this functionality is turned off.

Default: “”

Configuration:

  • INI entry:

    [callback_foreman]
    dir_store =
    
  • Environment variable: FOREMAN_DIR_STORE

disable_callback

string

Toggle to make the callback plugin disable itself even if it is loaded.

It can be set to ‘1’ to prevent the plugin from being used even if it gets loaded.

Default: 0

Configuration:

  • Environment variable: FOREMAN_CALLBACK_DISABLE

url

string / required

URL of the Foreman server.

Default: “http://localhost:3000”

Configuration:

  • INI entry:

    [callback_foreman]
    url = http://localhost:3000
    
  • Environment variable: FOREMAN_URL

  • Environment variable: FOREMAN_SERVER_URL

  • Environment variable: FOREMAN_SERVER

verify_certs

string

Toggle to decide whether to verify the Foreman certificate.

It can be set to ‘1’ to verify SSL certificates using the installed CAs or to a path pointing to a CA bundle.

Set to ‘0’ to disable certificate checking.

Default: 1

Configuration:

  • INI entry:

    [callback_foreman]
    verify_certs = 1
    
  • Environment variable: FOREMAN_SSL_VERIFY