theforeman.foreman.foreman callback – Sends events to Foreman

Note

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

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. You need further requirements to be able to use this callback plugin, see Requirements for details.

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

Callback plugin

This plugin is a notification callback. It sends information for a playbook run to other applications, services, or systems. See Callback plugins for more information on callback plugins.

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:

proxy_url

string

URL of the Foreman Smart Proxy server.

Configuration:

  • INI entry:

    [callback_foreman]
    proxy_url = VALUE
    
  • Environment variable: FOREMAN_PROXY_URL

report_type

string

endpoint type for reports: foreman or proxy

Default: "foreman"

Configuration:

  • INI entry:

    [callback_foreman]
    report_type = foreman
    
  • Environment variable: FOREMAN_REPORT_TYPE

url

string / required

URL of the Foreman server.

Configuration:

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:

Hint

Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.