:source: foreman_search_facts.py :orphan: .. _foreman_search_facts_module: foreman_search_facts -- Gather facts about Foreman resources ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. contents:: :local: :depth: 1 Synopsis -------- - Gather facts about Foreman resources Requirements ------------ The below requirements are needed on the host that executes this module. - apypie Parameters ---------- .. raw:: html
Parameter Choices/Defaults Comments
full_details
boolean
    Choices:
  • no ←
  • yes
If True all details about the found resources are returned

aliases: info
password
string / required
Password of the user accessing the Foreman server
resource
string / required
Resource to search
Set to an invalid choice like foo see all available options.
search
string
Search query to use
If None, all resources are returned
server_url
string / required
URL of the Foreman server
username
string / required
Username accessing the Foreman server
validate_certs
boolean
    Choices:
  • no
  • yes ←
Whether or not to verify the TLS certificates of the Foreman server

aliases: verify_ssl

Examples -------- .. code-block:: yaml+jinja - name: "Read a Setting" foreman_search_facts: username: "admin" password: "changeme" server_url: "https://foreman.example.com" resource: settings search: name = http_proxy register: result - debug: var: result.resources[0].value - name: "Read all Registries" foreman_search_facts: username: "admin" password: "changeme" server_url: "https://foreman.example.com" resource: registries register: result - debug: var: item.name with_items: result.resources - name: "Read all Organizations with full details" foreman_search_facts: username: "admin" password: "changeme" server_url: "https://foreman.example.com" resource: organizations full_details: true register: result - debug: var: result.resources Return Values ------------- Common return values are documented :ref:`here `, the following are the fields unique to this module: .. raw:: html
Key Returned Description
resources
list
always
Search results from Foreman



Status ------ - This module is not guaranteed to have a backwards compatible interface. *[preview]* - This module is :ref:`maintained by the Ansible Community `. *[community]* Authors ~~~~~~~ - Sean O'Keeffe (@sean797) .. hint:: If you notice any issues in this documentation you can `edit this document `_ to improve it.