` for details.
    To use it in a playbook, specify: :code:`theforeman.foreman.foreman`.
.. version_added
.. contents::
   :local:
   :depth: 1
.. Deprecated
Synopsis
--------
.. Description
- Get inventory hosts from Foreman.
- Can use the Reports API (default) or the Hosts API to fetch information about the hosts.
- The Reports API is faster with many hosts.
- The Reports API requires the :literal:`foreman\_ansible` plugin to be installed on the Foreman server.
- Some options only work when using the Reports API.
- Uses a YAML configuration file that ends with \`\`foreman.(yml\|yaml)\`\`.
.. Aliases
.. Requirements
.. _ansible_collections.theforeman.foreman.foreman_inventory_requirements:
Requirements
------------
The below requirements are needed on the local controller node that executes this inventory.
- requests \>= 1.1
.. 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
        
        
      .. _ansible_collections.theforeman.foreman.foreman_inventory__parameter-batch_size:
      .. rst-class:: ansible-option-title
      **batch_size**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`integer`
      .. raw:: html
        
 
    - .. raw:: html
        
      Number of hosts per batch that will be retrieved from the Foreman API per individual call
      .. rst-class:: ansible-option-line
      :ansible-option-default-bold:`Default:` :ansible-option-default:`250`
      .. raw:: html
        
  * - .. raw:: html
        
        
      .. _ansible_collections.theforeman.foreman.foreman_inventory__parameter-cache:
      .. rst-class:: ansible-option-title
      **cache**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`boolean`
      .. raw:: html
        
 
    - .. raw:: html
        
      Toggle to enable/disable the caching of the inventory's source data, requires a cache plugin setup to work.
      .. rst-class:: ansible-option-line
      :ansible-option-choices:`Choices:`
      - :ansible-option-choices-entry-default:`false` :ansible-option-choices-default-mark:`← (default)`
      - :ansible-option-choices-entry:`true`
      .. rst-class:: ansible-option-line
      :ansible-option-configuration:`Configuration:`
      - INI entry:
        .. code-block:: ini
          [inventory]
          cache = false
      - Environment variable: :envvar:`ANSIBLE\_INVENTORY\_CACHE`
      .. raw:: html
        
  * - .. raw:: html
        
        
      .. _ansible_collections.theforeman.foreman.foreman_inventory__parameter-cache_connection:
      .. rst-class:: ansible-option-title
      **cache_connection**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`string`
      .. raw:: html
        
 
    - .. raw:: html
        
      Cache connection data or path, read cache plugin documentation for specifics.
      .. rst-class:: ansible-option-line
      :ansible-option-configuration:`Configuration:`
      - INI entries:
        .. code-block:: ini
          [defaults]
          fact_caching_connection = VALUE
        .. code-block:: ini
          [inventory]
          cache_connection = VALUE
      - Environment variable: :envvar:`ANSIBLE\_CACHE\_PLUGIN\_CONNECTION`
      - Environment variable: :envvar:`ANSIBLE\_INVENTORY\_CACHE\_CONNECTION`
      .. raw:: html
        
  * - .. raw:: html
        
        
      .. _ansible_collections.theforeman.foreman.foreman_inventory__parameter-cache_plugin:
      .. rst-class:: ansible-option-title
      **cache_plugin**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`string`
      .. raw:: html
        
 
    - .. raw:: html
        
      Cache plugin to use for the inventory's source data.
      .. rst-class:: ansible-option-line
      :ansible-option-default-bold:`Default:` :ansible-option-default:`"memory"`
      .. rst-class:: ansible-option-line
      :ansible-option-configuration:`Configuration:`
      - INI entries:
        .. code-block:: ini
          [defaults]
          fact_caching = memory
        .. code-block:: ini
          [inventory]
          cache_plugin = memory
      - Environment variable: :envvar:`ANSIBLE\_CACHE\_PLUGIN`
      - Environment variable: :envvar:`ANSIBLE\_INVENTORY\_CACHE\_PLUGIN`
      .. raw:: html
        
  * - .. raw:: html
        
        
      .. _ansible_collections.theforeman.foreman.foreman_inventory__parameter-cache_prefix:
      .. rst-class:: ansible-option-title
      **cache_prefix**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`string`
      .. raw:: html
        
 
    - .. raw:: html
        
      Prefix to use for cache plugin files/tables.
      .. rst-class:: ansible-option-line
      :ansible-option-default-bold:`Default:` :ansible-option-default:`"ansible\_inventory\_"`
      .. rst-class:: ansible-option-line
      :ansible-option-configuration:`Configuration:`
      - INI entries:
        .. code-block:: ini
          [defaults]
          fact_caching_prefix = ansible_inventory_
        .. code-block:: ini
          [inventory]
          cache_prefix = ansible_inventory_
      - Environment variable: :envvar:`ANSIBLE\_CACHE\_PLUGIN\_PREFIX`
      - Environment variable: :envvar:`ANSIBLE\_INVENTORY\_CACHE\_PLUGIN\_PREFIX`
      .. raw:: html
        
  * - .. raw:: html
        
        
      .. _ansible_collections.theforeman.foreman.foreman_inventory__parameter-cache_timeout:
      .. rst-class:: ansible-option-title
      **cache_timeout**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`integer`
      .. raw:: html
        
 
    - .. raw:: html
        
      Cache duration in seconds.
      .. rst-class:: ansible-option-line
      :ansible-option-default-bold:`Default:` :ansible-option-default:`3600`
      .. rst-class:: ansible-option-line
      :ansible-option-configuration:`Configuration:`
      - INI entries:
        .. code-block:: ini
          [defaults]
          fact_caching_timeout = 3600
        .. code-block:: ini
          [inventory]
          cache_timeout = 3600
      - Environment variable: :envvar:`ANSIBLE\_CACHE\_PLUGIN\_TIMEOUT`
      - Environment variable: :envvar:`ANSIBLE\_INVENTORY\_CACHE\_TIMEOUT`
      .. raw:: html
        
  * - .. raw:: html
        
        
      .. _ansible_collections.theforeman.foreman.foreman_inventory__parameter-compose:
      .. rst-class:: ansible-option-title
      **compose**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`dictionary`
      .. raw:: html
        
 
    - .. raw:: html
        
      Create vars from jinja2 expressions.
      .. rst-class:: ansible-option-line
      :ansible-option-default-bold:`Default:` :ansible-option-default:`{}`
      .. raw:: html
        
  * - .. raw:: html
        
        
      .. _ansible_collections.theforeman.foreman.foreman_inventory__parameter-foreman:
      .. rst-class:: ansible-option-title
      **foreman**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`string`
      .. raw:: html
        
 
    - .. raw:: html
        
      Foreman server related configuration, deprecated.
      You can pass :emphasis:`use\_reports\_api` in this dict to enable the Reports API.
      Only for backward compatibility.
      .. raw:: html
        
  * - .. raw:: html
        
        
      .. _ansible_collections.theforeman.foreman.foreman_inventory__parameter-group_prefix:
      .. rst-class:: ansible-option-title
      **group_prefix**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`string`
      .. raw:: html
        
 
    - .. raw:: html
        
      prefix to apply to foreman groups
      .. rst-class:: ansible-option-line
      :ansible-option-default-bold:`Default:` :ansible-option-default:`"foreman\_"`
      .. raw:: html
        
  * - .. raw:: html
        
        
      .. _ansible_collections.theforeman.foreman.foreman_inventory__parameter-groups:
      .. rst-class:: ansible-option-title
      **groups**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`dictionary`
      .. raw:: html
        
 
    - .. raw:: html
        
      Add hosts to group based on Jinja2 conditionals.
      .. rst-class:: ansible-option-line
      :ansible-option-default-bold:`Default:` :ansible-option-default:`{}`
      .. raw:: html
        
  * - .. raw:: html
        
        
      .. _ansible_collections.theforeman.foreman.foreman_inventory__parameter-host_filters:
      .. rst-class:: ansible-option-title
      **host_filters**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`string`
      .. raw:: html
        
 
    - .. raw:: html
        
      This can be used to restrict the list of returned host
      .. raw:: html
        
  * - .. raw:: html
        
        
      .. _ansible_collections.theforeman.foreman.foreman_inventory__parameter-hostnames:
      .. rst-class:: ansible-option-title
      **hostnames**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`list` / :ansible-option-elements:`elements=string`
      .. raw:: html
        
 
    - .. raw:: html
        
      A list of templates in order of precedence to compose inventory\_hostname.
      If the template results in an empty string or None value it is ignored.
      .. rst-class:: ansible-option-line
      :ansible-option-default-bold:`Default:` :ansible-option-default:`["name"]`
      .. raw:: html
        
  * - .. raw:: html
        
        
      .. _ansible_collections.theforeman.foreman.foreman_inventory__parameter-keyed_groups:
      .. rst-class:: ansible-option-title
      **keyed_groups**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`list` / :ansible-option-elements:`elements=dictionary`
      .. raw:: html
        
 
    - .. raw:: html
        
      Add hosts to group based on the values of a variable.
      .. rst-class:: ansible-option-line
      :ansible-option-default-bold:`Default:` :ansible-option-default:`[]`
      .. raw:: html
        
  * - .. raw:: html
        
        
      .. raw:: latex
        \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth}
      .. _ansible_collections.theforeman.foreman.foreman_inventory__parameter-keyed_groups/default_value:
      .. rst-class:: ansible-option-title
      **default_value**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`string`
      :ansible-option-versionadded:`added in ansible-core 2.12`
      .. raw:: html
        
 
      .. raw:: latex
        \end{minipage}
    - .. raw:: html
        
      The default value when the host variable's value is :ansval:`None` or an empty string.
      This option is mutually exclusive with :ansopt:`theforeman.foreman.foreman#inventory:keyed\_groups[].trailing\_separator`.
      .. raw:: html
        
  * - .. raw:: html
        
        
      .. raw:: latex
        \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth}
      .. _ansible_collections.theforeman.foreman.foreman_inventory__parameter-keyed_groups/key:
      .. rst-class:: ansible-option-title
      **key**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`string`
      .. raw:: html
        
 
      .. raw:: latex
        \end{minipage}
    - .. raw:: html
        
      The key from input dictionary used to generate groups.
      .. raw:: html
        
  * - .. raw:: html
        
        
      .. raw:: latex
        \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth}
      .. _ansible_collections.theforeman.foreman.foreman_inventory__parameter-keyed_groups/parent_group:
      .. rst-class:: ansible-option-title
      **parent_group**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`string`
      .. raw:: html
        
 
      .. raw:: latex
        \end{minipage}
    - .. raw:: html
        
      parent group for keyed group.
      .. raw:: html
        
  * - .. raw:: html
        
        
      .. raw:: latex
        \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth}
      .. _ansible_collections.theforeman.foreman.foreman_inventory__parameter-keyed_groups/prefix:
      .. rst-class:: ansible-option-title
      **prefix**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`string`
      .. raw:: html
        
 
      .. raw:: latex
        \end{minipage}
    - .. raw:: html
        
      A keyed group name will start with this prefix.
      .. rst-class:: ansible-option-line
      :ansible-option-default-bold:`Default:` :ansible-option-default:`""`
      .. raw:: html
        
  * - .. raw:: html
        
        
      .. raw:: latex
        \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth}
      .. _ansible_collections.theforeman.foreman.foreman_inventory__parameter-keyed_groups/separator:
      .. rst-class:: ansible-option-title
      **separator**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`string`
      .. raw:: html
        
 
      .. raw:: latex
        \end{minipage}
    - .. raw:: html
        
      separator used to build the keyed group name.
      .. rst-class:: ansible-option-line
      :ansible-option-default-bold:`Default:` :ansible-option-default:`"\_"`
      .. raw:: html
        
  * - .. raw:: html
        
        
      .. raw:: latex
        \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth}
      .. _ansible_collections.theforeman.foreman.foreman_inventory__parameter-keyed_groups/trailing_separator:
      .. rst-class:: ansible-option-title
      **trailing_separator**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`boolean`
      :ansible-option-versionadded:`added in ansible-core 2.12`
      .. raw:: html
        
 
      .. raw:: latex
        \end{minipage}
    - .. raw:: html
        
      Set this option to :ansval:`false` to omit the :ansopt:`theforeman.foreman.foreman#inventory:keyed\_groups[].separator` after the host variable when the value is :ansval:`None` or an empty string.
      This option is mutually exclusive with :ansopt:`theforeman.foreman.foreman#inventory:keyed\_groups[].default\_value`.
      .. rst-class:: ansible-option-line
      :ansible-option-choices:`Choices:`
      - :ansible-option-choices-entry:`false`
      - :ansible-option-choices-entry-default:`true` :ansible-option-choices-default-mark:`← (default)`
      .. raw:: html
        
  * - .. raw:: html
        
        
      .. _ansible_collections.theforeman.foreman.foreman_inventory__parameter-leading_separator:
      .. rst-class:: ansible-option-title
      **leading_separator**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`boolean`
      :ansible-option-versionadded:`added in ansible-core 2.11`
      .. raw:: html
        
 
    - .. raw:: html
        
      Use in conjunction with :ansopt:`theforeman.foreman.foreman#inventory:keyed\_groups`.
      By default, a keyed group that does not have a prefix or a separator provided will have a name that starts with an underscore.
      This is because the default prefix is :ansval:`""` and the default separator is :ansval:`"\_"`.
      Set this option to :ansval:`false` to omit the leading underscore (or other separator) if no prefix is given.
      If the group name is derived from a mapping the separator is still used to concatenate the items.
      To not use a separator in the group name at all, set the separator for the keyed group to an empty string instead.
      .. rst-class:: ansible-option-line
      :ansible-option-choices:`Choices:`
      - :ansible-option-choices-entry:`false`
      - :ansible-option-choices-entry-default:`true` :ansible-option-choices-default-mark:`← (default)`
      .. raw:: html
        
  * - .. raw:: html
        
        
      .. _ansible_collections.theforeman.foreman.foreman_inventory__parameter-legacy_hostvars:
      .. rst-class:: ansible-option-title
      **legacy_hostvars**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`boolean`
      .. raw:: html
        
 
    - .. raw:: html
        
      Toggle, if true the plugin will build legacy hostvars present in the foreman script
      Places hostvars in a dictionary with keys \`foreman\`, \`foreman\_facts\`, and \`foreman\_params\`
      .. rst-class:: ansible-option-line
      :ansible-option-choices:`Choices:`
      - :ansible-option-choices-entry-default:`false` :ansible-option-choices-default-mark:`← (default)`
      - :ansible-option-choices-entry:`true`
      .. raw:: html
        
  * - .. raw:: html
        
        
      .. _ansible_collections.theforeman.foreman.foreman_inventory__parameter-max_timeout:
      .. rst-class:: ansible-option-title
      **max_timeout**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`integer`
      .. raw:: html
        
 
    - .. raw:: html
        
      Timeout before falling back to old host API when using report\_data endpoint while polling.
      .. rst-class:: ansible-option-line
      :ansible-option-default-bold:`Default:` :ansible-option-default:`600`
      .. raw:: html
        
  * - .. raw:: html
        
        
      .. _ansible_collections.theforeman.foreman.foreman_inventory__parameter-password:
      .. rst-class:: ansible-option-title
      **password**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`string` / :ansible-option-required:`required`
      .. raw:: html
        
 
    - .. raw:: html
        
      Password of the user accessing the Foreman server.
      .. rst-class:: ansible-option-line
      :ansible-option-configuration:`Configuration:`
      - Environment variable: :envvar:`FOREMAN\_PASSWORD`
      .. raw:: html
        
  * - .. raw:: html
        
        
      .. _ansible_collections.theforeman.foreman.foreman_inventory__parameter-plugin:
      .. rst-class:: ansible-option-title
      **plugin**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`string` / :ansible-option-required:`required`
      .. raw:: html
        
 
    - .. raw:: html
        
      token that ensures this is a source file for the :literal:`foreman` plugin.
      .. rst-class:: ansible-option-line
      :ansible-option-choices:`Choices:`
      - :ansible-option-choices-entry:`"theforeman.foreman.foreman"`
      .. raw:: html
        
  * - .. raw:: html
        
        
      .. _ansible_collections.theforeman.foreman.foreman_inventory__parameter-poll_interval:
      .. rst-class:: ansible-option-title
      **poll_interval**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`integer`
      .. raw:: html
        
 
    - .. raw:: html
        
      The polling interval between 2 calls to the report\_data endpoint while polling.
      .. rst-class:: ansible-option-line
      :ansible-option-default-bold:`Default:` :ansible-option-default:`10`
      .. raw:: html
        
  * - .. raw:: html
        
        
      .. _ansible_collections.theforeman.foreman.foreman_inventory__parameter-report:
      .. rst-class:: ansible-option-title
      **report**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`dictionary`
      .. raw:: html
        
 
    - .. raw:: html
        
      Report API specific configuration, deprecated.
      You can pass the Report API specific params as part of this dict, instead of the main configuration.
      Only for backward compatibility.
      .. raw:: html
        
  * - .. raw:: html
        
        
      .. _ansible_collections.theforeman.foreman.foreman_inventory__parameter-strict:
      .. rst-class:: ansible-option-title
      **strict**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`boolean`
      .. raw:: html
        
 
    - .. raw:: html
        
      If :ansval:`yes` make invalid entries a fatal error, otherwise skip and continue.
      Since it is possible to use facts in the expressions they might not always be available and we ignore those errors by default.
      .. rst-class:: ansible-option-line
      :ansible-option-choices:`Choices:`
      - :ansible-option-choices-entry-default:`false` :ansible-option-choices-default-mark:`← (default)`
      - :ansible-option-choices-entry:`true`
      .. raw:: html
        
  * - .. raw:: html
        
        
      .. _ansible_collections.theforeman.foreman.foreman_inventory__parameter-url:
      .. rst-class:: ansible-option-title
      **url**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`string` / :ansible-option-required:`required`
      .. raw:: html
        
 
    - .. raw:: html
        
      URL of the Foreman server.
      .. rst-class:: ansible-option-line
      :ansible-option-configuration:`Configuration:`
      - Environment variable: :envvar:`FOREMAN\_SERVER`
      - Environment variable: :envvar:`FOREMAN\_SERVER\_URL`
      - Environment variable: :envvar:`FOREMAN\_URL`
      .. raw:: html
        
  * - .. raw:: html
        
        
      .. _ansible_collections.theforeman.foreman.foreman_inventory__parameter-use_extra_vars:
      .. rst-class:: ansible-option-title
      **use_extra_vars**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`boolean`
      :ansible-option-versionadded:`added in ansible-core 2.11`
      .. raw:: html
        
 
    - .. raw:: html
        
      Merge extra vars into the available variables for composition (highest precedence).
      .. rst-class:: ansible-option-line
      :ansible-option-choices:`Choices:`
      - :ansible-option-choices-entry-default:`false` :ansible-option-choices-default-mark:`← (default)`
      - :ansible-option-choices-entry:`true`
      .. rst-class:: ansible-option-line
      :ansible-option-configuration:`Configuration:`
      - INI entry:
        .. code-block:: ini
          [inventory_plugins]
          use_extra_vars = false
      - Environment variable: :envvar:`ANSIBLE\_INVENTORY\_USE\_EXTRA\_VARS`
      .. raw:: html
        
  * - .. raw:: html
        
        
      .. _ansible_collections.theforeman.foreman.foreman_inventory__parameter-use_reports_api:
      .. rst-class:: ansible-option-title
      **use_reports_api**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`boolean`
      .. raw:: html
        
 
    - .. raw:: html
        
      Use Reports API.
      .. rst-class:: ansible-option-line
      :ansible-option-choices:`Choices:`
      - :ansible-option-choices-entry:`false`
      - :ansible-option-choices-entry-default:`true` :ansible-option-choices-default-mark:`← (default)`
      .. raw:: html
        
  * - .. raw:: html
        
        
      .. _ansible_collections.theforeman.foreman.foreman_inventory__parameter-user:
      .. rst-class:: ansible-option-title
      **user**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`string` / :ansible-option-required:`required`
      .. raw:: html
        
 
    - .. raw:: html
        
      Username accessing the Foreman server.
      .. rst-class:: ansible-option-line
      :ansible-option-configuration:`Configuration:`
      - Environment variable: :envvar:`FOREMAN\_USER`
      - Environment variable: :envvar:`FOREMAN\_USERNAME`
      .. raw:: html
        
  * - .. raw:: html
        
        
      .. _ansible_collections.theforeman.foreman.foreman_inventory__parameter-validate_certs:
      .. rst-class:: ansible-option-title
      **validate_certs**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`boolean`
      .. raw:: html
        
 
    - .. raw:: html
        
      Whether or not to verify the TLS certificates of the Foreman server.
      .. rst-class:: ansible-option-line
      :ansible-option-choices:`Choices:`
      - :ansible-option-choices-entry:`false`
      - :ansible-option-choices-entry-default:`true` :ansible-option-choices-default-mark:`← (default)`
      .. rst-class:: ansible-option-line
      :ansible-option-configuration:`Configuration:`
      - Environment variable: :envvar:`FOREMAN\_VALIDATE\_CERTS`
      .. raw:: html
        
  * - .. raw:: html
        
        
      .. _ansible_collections.theforeman.foreman.foreman_inventory__parameter-vars_prefix:
      .. rst-class:: ansible-option-title
      **vars_prefix**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`string`
      .. raw:: html
        
 
    - .. raw:: html
        
      prefix to apply to host variables, does not include facts nor params
      .. rst-class:: ansible-option-line
      :ansible-option-default-bold:`Default:` :ansible-option-default:`"foreman\_"`
      .. raw:: html
        
  * - .. raw:: html
        
        
      .. _ansible_collections.theforeman.foreman.foreman_inventory__parameter-want_content_facet_attributes:
      .. rst-class:: ansible-option-title
      **want_content_facet_attributes**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`boolean`
      .. raw:: html
        
 
    - .. raw:: html
        
      Toggle, if true the inventory will fetch content view details that the host is tied to.
      Only applies to inventories using the Reports API \- attribute is ignored otherwise.
      .. rst-class:: ansible-option-line
      :ansible-option-choices:`Choices:`
      - :ansible-option-choices-entry:`false`
      - :ansible-option-choices-entry-default:`true` :ansible-option-choices-default-mark:`← (default)`
      .. raw:: html
        
  * - .. raw:: html
        
        
      .. _ansible_collections.theforeman.foreman.foreman_inventory__parameter-want_facts:
      .. rst-class:: ansible-option-title
      **want_facts**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`boolean`
      .. raw:: html
        
 
    - .. raw:: html
        
      Toggle, if True the plugin will retrieve host facts from the server
      .. rst-class:: ansible-option-line
      :ansible-option-choices:`Choices:`
      - :ansible-option-choices-entry-default:`false` :ansible-option-choices-default-mark:`← (default)`
      - :ansible-option-choices-entry:`true`
      .. raw:: html
        
  * - .. raw:: html
        
        
      .. _ansible_collections.theforeman.foreman.foreman_inventory__parameter-want_host_group:
      .. rst-class:: ansible-option-title
      **want_host_group**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`boolean`
      .. raw:: html
        
 
    - .. raw:: html
        
      Toggle, if true the inventory will fetch host\_groups and create groupings for the same.
      Only applies to inventories using the Reports API \- attribute is ignored otherwise.
      .. rst-class:: ansible-option-line
      :ansible-option-choices:`Choices:`
      - :ansible-option-choices-entry:`false`
      - :ansible-option-choices-entry-default:`true` :ansible-option-choices-default-mark:`← (default)`
      .. raw:: html
        
  * - .. raw:: html
        
        
      .. _ansible_collections.theforeman.foreman.foreman_inventory__parameter-want_hostcollections:
      .. rst-class:: ansible-option-title
      **want_hostcollections**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`boolean`
      .. raw:: html
        
 
    - .. raw:: html
        
      Toggle, if true the plugin will create Ansible groups for host collections
      .. rst-class:: ansible-option-line
      :ansible-option-choices:`Choices:`
      - :ansible-option-choices-entry-default:`false` :ansible-option-choices-default-mark:`← (default)`
      - :ansible-option-choices-entry:`true`
      .. raw:: html
        
  * - .. raw:: html
        
        
      .. _ansible_collections.theforeman.foreman.foreman_inventory__parameter-want_ipv4:
      .. rst-class:: ansible-option-title
      **want_ipv4**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`boolean`
      .. raw:: html
        
 
    - .. raw:: html
        
      Toggle, if true the inventory will fetch ipv4 address of the host.
      Only applies to inventories using the Reports API \- attribute is ignored otherwise.
      .. rst-class:: ansible-option-line
      :ansible-option-choices:`Choices:`
      - :ansible-option-choices-entry:`false`
      - :ansible-option-choices-entry-default:`true` :ansible-option-choices-default-mark:`← (default)`
      .. raw:: html
        
  * - .. raw:: html
        
        
      .. _ansible_collections.theforeman.foreman.foreman_inventory__parameter-want_ipv6:
      .. rst-class:: ansible-option-title
      **want_ipv6**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`boolean`
      .. raw:: html
        
 
    - .. raw:: html
        
      Toggle, if true the inventory will fetch ipv6 address of the host.
      Only applies to inventories using the Reports API \- attribute is ignored otherwise.
      .. rst-class:: ansible-option-line
      :ansible-option-choices:`Choices:`
      - :ansible-option-choices-entry:`false`
      - :ansible-option-choices-entry-default:`true` :ansible-option-choices-default-mark:`← (default)`
      .. raw:: html
        
  * - .. raw:: html
        
        
      .. _ansible_collections.theforeman.foreman.foreman_inventory__parameter-want_location:
      .. rst-class:: ansible-option-title
      **want_location**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`boolean`
      .. raw:: html
        
 
    - .. raw:: html
        
      Toggle, if true the inventory will fetch location the host belongs to and create groupings for the same.
      Only applies to inventories using the Reports API \- attribute is ignored otherwise.
      .. rst-class:: ansible-option-line
      :ansible-option-choices:`Choices:`
      - :ansible-option-choices-entry:`false`
      - :ansible-option-choices-entry-default:`true` :ansible-option-choices-default-mark:`← (default)`
      .. raw:: html
        
  * - .. raw:: html
        
        
      .. _ansible_collections.theforeman.foreman.foreman_inventory__parameter-want_organization:
      .. rst-class:: ansible-option-title
      **want_organization**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`boolean`
      .. raw:: html
        
 
    - .. raw:: html
        
      Toggle, if true the inventory will fetch organization the host belongs to and create groupings for the same.
      Only applies to inventories using the Reports API \- attribute is ignored otherwise.
      .. rst-class:: ansible-option-line
      :ansible-option-choices:`Choices:`
      - :ansible-option-choices-entry:`false`
      - :ansible-option-choices-entry-default:`true` :ansible-option-choices-default-mark:`← (default)`
      .. raw:: html
        
  * - .. raw:: html
        
        
      .. _ansible_collections.theforeman.foreman.foreman_inventory__parameter-want_params:
      .. rst-class:: ansible-option-title
      **want_params**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`boolean`
      .. raw:: html
        
 
    - .. raw:: html
        
      Toggle, if true the inventory will retrieve 'all\_parameters' information as host vars
      .. rst-class:: ansible-option-line
      :ansible-option-choices:`Choices:`
      - :ansible-option-choices-entry-default:`false` :ansible-option-choices-default-mark:`← (default)`
      - :ansible-option-choices-entry:`true`
      .. raw:: html
        
  * - .. raw:: html
        
        
      .. _ansible_collections.theforeman.foreman.foreman_inventory__parameter-want_smart_proxies:
      .. rst-class:: ansible-option-title
      **want_smart_proxies**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`boolean`
      .. raw:: html
        
 
    - .. raw:: html
        
      Toggle, if true the inventory will fetch smart proxy that the host is registered to.
      Only applies to inventories using the Reports API \- attribute is ignored otherwise.
      .. rst-class:: ansible-option-line
      :ansible-option-choices:`Choices:`
      - :ansible-option-choices-entry:`false`
      - :ansible-option-choices-entry-default:`true` :ansible-option-choices-default-mark:`← (default)`
      .. raw:: html
        
  * - .. raw:: html
        
        
      .. _ansible_collections.theforeman.foreman.foreman_inventory__parameter-want_subnet:
      .. rst-class:: ansible-option-title
      **want_subnet**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`boolean`
      .. raw:: html
        
 
    - .. raw:: html
        
      Toggle, if true the inventory will fetch subnet.
      Only applies to inventories using the Reports API \- attribute is ignored otherwise.
      .. rst-class:: ansible-option-line
      :ansible-option-choices:`Choices:`
      - :ansible-option-choices-entry:`false`
      - :ansible-option-choices-entry-default:`true` :ansible-option-choices-default-mark:`← (default)`
      .. raw:: html
        
  * - .. raw:: html
        
        
      .. _ansible_collections.theforeman.foreman.foreman_inventory__parameter-want_subnet_v6:
      .. rst-class:: ansible-option-title
      **want_subnet_v6**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`boolean`
      .. raw:: html
        
 
    - .. raw:: html
        
      Toggle, if true the inventory will fetch ipv6 subnet.
      Only applies to inventories using the Reports API \- attribute is ignored otherwise.
      .. rst-class:: ansible-option-line
      :ansible-option-choices:`Choices:`
      - :ansible-option-choices-entry:`false`
      - :ansible-option-choices-entry-default:`true` :ansible-option-choices-default-mark:`← (default)`
      .. raw:: html
        
.. note::
    Configuration entries listed above for each entry type (Ansible variable, environment variable, and so on) 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.
    The entry types are also ordered by precedence from low to high priority order.
    For example, an ansible.cfg entry (further up in the list) is overwritten by an Ansible variable (further down in the list).
.. Attributes
.. Notes
Notes
-----
.. note::
   - Inventories are not finalized at this stage, so the auto populated :literal:`all` and :literal:`ungrouped` groups will only reflect what previous inventory sources explicitly added to them.
   - Runtime 'magic variables' are not available during inventory construction. For example, :literal:`groups` and :literal:`hostvars` do not exist yet.
.. Seealso
.. Examples
Examples
--------
.. code-block:: yaml+jinja
    # my.foreman.yml
    plugin: theforeman.foreman.foreman
    url: https://foreman.example.com
    user: ansibleinventory
    password: changeme
    # Only fetch hosts in the Web Engineering organization
    host_filters: 'organization="Web Engineering"'
    # Use short names (not FQDN) for the hosts in the intentory
    hostnames:
      - name.split('.')[0]
.. Facts
.. Return values
..  Status (Presently only deprecated)
.. Authors
.. 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