: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
organization
string
Scope the searched resource by organization
params
dictionary
Add parameters to the API call if necessary
If not specified, no additional parameters are passed
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

Notes ----- .. note:: - Some resources don't support scoping and will return errors when you pass *organization* or unknown data in *params*. 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 - name: Get all existing subscriptions for organization with id 1 foreman_search_facts: username: "admin" password: "changeme" server_url: "https://foreman.example.com" resource: subscriptions params: organization_id: 1 register: result - debug: var: result - name: Get all existing activation keys for organization ACME foreman_search_facts: username: "admin" password: "changeme" server_url: "https://foreman.example.com" resource: activation_keys organization: ACME register: result - debug: var: result 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.