.. Document meta

:orphan:

.. |antsibull-internal-nbsp| unicode:: 0xA0
    :trim:

.. meta::
  :antsibull-docs: 2.16.3

.. Anchors

.. _ansible_collections.theforeman.foreman.foreman_callback:

.. Anchors: short name for ansible.builtin

.. Title

theforeman.foreman.foreman callback -- Sends events to Foreman
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

.. Collection note

.. note::
    This callback plugin is part of the `theforeman.foreman collection <https://galaxy.ansible.com/ui/repo/published/theforeman/foreman/>`_ (version 5.3.0).

    It is not included in ``ansible-core``.
    To check whether it is installed, run :code:`ansible-galaxy collection list`.

    To install it, use: :code:`ansible-galaxy collection install theforeman.foreman`.
    You need further requirements to be able to use this callback plugin,
    see :ref:`Requirements <ansible_collections.theforeman.foreman.foreman_callback_requirements>` for details.

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

.. version_added


.. contents::
   :local:
   :depth: 1

.. Deprecated


Callback plugin
---------------

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

Synopsis
--------

.. Description

- This callback will report facts and task events to Foreman


.. Aliases


.. Requirements

.. _ansible_collections.theforeman.foreman.foreman_callback_requirements:

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

- whitelisting in configuration
- requests (python library)






.. Options

Parameters
----------

.. tabularcolumns:: \X{1}{3}\X{2}{3}

.. list-table::
  :width: 100%
  :widths: auto
  :header-rows: 1
  :class: longtable ansible-option-table

  * - Parameter
    - Comments

  * - .. raw:: html

        <div class="ansible-option-cell">
        <div class="ansibleOptionAnchor" id="parameter-client_cert"></div>
        <div class="ansibleOptionAnchor" id="parameter-ssl_cert"></div>

      .. _ansible_collections.theforeman.foreman.foreman_callback__parameter-client_cert:
      .. _ansible_collections.theforeman.foreman.foreman_callback__parameter-ssl_cert:

      .. rst-class:: ansible-option-title

      **client_cert**

      .. raw:: html

        <a class="ansibleOptionLink" href="#parameter-client_cert" title="Permalink to this option"></a>

      .. ansible-option-type-line::

        :ansible-option-aliases:`aliases: ssl_cert`

        :ansible-option-type:`string`




      .. raw:: html

        </div>

    - .. raw:: html

        <div class="ansible-option-cell">

      X509 certificate to authenticate to Foreman if https is used


      .. rst-class:: ansible-option-line

      :ansible-option-default-bold:`Default:` :ansible-option-default:`"/etc/foreman/client\_cert.pem"`

      .. rst-class:: ansible-option-line

      :ansible-option-configuration:`Configuration:`

      - INI entries:

        .. code-block:: ini

          [callback_foreman]
          ssl_cert = /etc/foreman/client_cert.pem



        .. code-block:: ini

          [callback_foreman]
          client_cert = /etc/foreman/client_cert.pem


      - Environment variable: :envvar:`FOREMAN\_SSL\_CERT`


      .. raw:: html

        </div>

  * - .. raw:: html

        <div class="ansible-option-cell">
        <div class="ansibleOptionAnchor" id="parameter-client_key"></div>
        <div class="ansibleOptionAnchor" id="parameter-ssl_key"></div>

      .. _ansible_collections.theforeman.foreman.foreman_callback__parameter-client_key:
      .. _ansible_collections.theforeman.foreman.foreman_callback__parameter-ssl_key:

      .. rst-class:: ansible-option-title

      **client_key**

      .. raw:: html

        <a class="ansibleOptionLink" href="#parameter-client_key" title="Permalink to this option"></a>

      .. ansible-option-type-line::

        :ansible-option-aliases:`aliases: ssl_key`

        :ansible-option-type:`string`




      .. raw:: html

        </div>

    - .. raw:: html

        <div class="ansible-option-cell">

      the corresponding private key


      .. rst-class:: ansible-option-line

      :ansible-option-default-bold:`Default:` :ansible-option-default:`"/etc/foreman/client\_key.pem"`

      .. rst-class:: ansible-option-line

      :ansible-option-configuration:`Configuration:`

      - INI entries:

        .. code-block:: ini

          [callback_foreman]
          ssl_key = /etc/foreman/client_key.pem



        .. code-block:: ini

          [callback_foreman]
          client_key = /etc/foreman/client_key.pem


      - Environment variable: :envvar:`FOREMAN\_SSL\_KEY`


      .. raw:: html

        </div>

  * - .. raw:: html

        <div class="ansible-option-cell">
        <div class="ansibleOptionAnchor" id="parameter-dir_store"></div>

      .. _ansible_collections.theforeman.foreman.foreman_callback__parameter-dir_store:

      .. rst-class:: ansible-option-title

      **dir_store**

      .. raw:: html

        <a class="ansibleOptionLink" href="#parameter-dir_store" title="Permalink to this option"></a>

      .. ansible-option-type-line::

        :ansible-option-type:`string`




      .. raw:: html

        </div>

    - .. raw:: html

        <div class="ansible-option-cell">

      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.


      .. rst-class:: ansible-option-line

      :ansible-option-default-bold:`Default:` :ansible-option-default:`""`

      .. rst-class:: ansible-option-line

      :ansible-option-configuration:`Configuration:`

      - INI entry:

        .. code-block:: ini

          [callback_foreman]
          dir_store = ""


      - Environment variable: :envvar:`FOREMAN\_DIR\_STORE`


      .. raw:: html

        </div>

  * - .. raw:: html

        <div class="ansible-option-cell">
        <div class="ansibleOptionAnchor" id="parameter-disable_callback"></div>

      .. _ansible_collections.theforeman.foreman.foreman_callback__parameter-disable_callback:

      .. rst-class:: ansible-option-title

      **disable_callback**

      .. raw:: html

        <a class="ansibleOptionLink" href="#parameter-disable_callback" title="Permalink to this option"></a>

      .. ansible-option-type-line::

        :ansible-option-type:`string`




      .. raw:: html

        </div>

    - .. raw:: html

        <div class="ansible-option-cell">

      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.


      .. rst-class:: ansible-option-line

      :ansible-option-default-bold:`Default:` :ansible-option-default:`0`

      .. rst-class:: ansible-option-line

      :ansible-option-configuration:`Configuration:`

      - Environment variable: :envvar:`FOREMAN\_CALLBACK\_DISABLE`


      .. raw:: html

        </div>

  * - .. raw:: html

        <div class="ansible-option-cell">
        <div class="ansibleOptionAnchor" id="parameter-proxy_url"></div>

      .. _ansible_collections.theforeman.foreman.foreman_callback__parameter-proxy_url:

      .. rst-class:: ansible-option-title

      **proxy_url**

      .. raw:: html

        <a class="ansibleOptionLink" href="#parameter-proxy_url" title="Permalink to this option"></a>

      .. ansible-option-type-line::

        :ansible-option-type:`string`




      .. raw:: html

        </div>

    - .. raw:: html

        <div class="ansible-option-cell">

      URL of the Foreman Smart Proxy server.


      .. rst-class:: ansible-option-line

      :ansible-option-configuration:`Configuration:`

      - INI entry:

        .. code-block:: ini

          [callback_foreman]
          proxy_url = VALUE


      - Environment variable: :envvar:`FOREMAN\_PROXY\_URL`


      .. raw:: html

        </div>

  * - .. raw:: html

        <div class="ansible-option-cell">
        <div class="ansibleOptionAnchor" id="parameter-report_type"></div>

      .. _ansible_collections.theforeman.foreman.foreman_callback__parameter-report_type:

      .. rst-class:: ansible-option-title

      **report_type**

      .. raw:: html

        <a class="ansibleOptionLink" href="#parameter-report_type" title="Permalink to this option"></a>

      .. ansible-option-type-line::

        :ansible-option-type:`string`




      .. raw:: html

        </div>

    - .. raw:: html

        <div class="ansible-option-cell">

      endpoint type for reports: foreman or proxy


      .. rst-class:: ansible-option-line

      :ansible-option-default-bold:`Default:` :ansible-option-default:`"foreman"`

      .. rst-class:: ansible-option-line

      :ansible-option-configuration:`Configuration:`

      - INI entry:

        .. code-block:: ini

          [callback_foreman]
          report_type = foreman


      - Environment variable: :envvar:`FOREMAN\_REPORT\_TYPE`


      .. raw:: html

        </div>

  * - .. raw:: html

        <div class="ansible-option-cell">
        <div class="ansibleOptionAnchor" id="parameter-url"></div>

      .. _ansible_collections.theforeman.foreman.foreman_callback__parameter-url:

      .. rst-class:: ansible-option-title

      **url**

      .. raw:: html

        <a class="ansibleOptionLink" href="#parameter-url" title="Permalink to this option"></a>

      .. ansible-option-type-line::

        :ansible-option-type:`string` / :ansible-option-required:`required`




      .. raw:: html

        </div>

    - .. raw:: html

        <div class="ansible-option-cell">

      URL of the Foreman server.


      .. rst-class:: ansible-option-line

      :ansible-option-configuration:`Configuration:`

      - INI entry:

        .. code-block:: ini

          [callback_foreman]
          url = VALUE


      - Environment variable: :envvar:`FOREMAN\_URL`

      - Environment variable: :envvar:`FOREMAN\_SERVER\_URL`

      - Environment variable: :envvar:`FOREMAN\_SERVER`


      .. raw:: html

        </div>

  * - .. raw:: html

        <div class="ansible-option-cell">
        <div class="ansibleOptionAnchor" id="parameter-verify_certs"></div>

      .. _ansible_collections.theforeman.foreman.foreman_callback__parameter-verify_certs:

      .. rst-class:: ansible-option-title

      **verify_certs**

      .. raw:: html

        <a class="ansibleOptionLink" href="#parameter-verify_certs" title="Permalink to this option"></a>

      .. ansible-option-type-line::

        :ansible-option-type:`string`




      .. raw:: html

        </div>

    - .. raw:: html

        <div class="ansible-option-cell">

      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.


      .. rst-class:: ansible-option-line

      :ansible-option-default-bold:`Default:` :ansible-option-default:`1`

      .. rst-class:: ansible-option-line

      :ansible-option-configuration:`Configuration:`

      - INI entry:

        .. code-block:: ini

          [callback_foreman]
          verify_certs = 1


      - Environment variable: :envvar:`FOREMAN\_SSL\_VERIFY`


      .. raw:: html

        </div>


.. Attributes


.. Notes


.. Seealso


.. Examples



.. Facts


.. Return values


..  Status (Presently only deprecated)


.. Authors


.. 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.

.. Extra links

Collection links
~~~~~~~~~~~~~~~~

.. ansible-links::

  - title: "Issue Tracker"
    url: "https://github.com/theforeman/foreman-ansible-modules/issues"
    external: true
  - title: "Homepage"
    url: "https://theforeman.org/"
    external: true
  - title: "Repository (Sources)"
    url: "https://github.com/theforeman/foreman-ansible-modules"
    external: true


.. Parsing errors