redhat.satellite.resource_info – Gather information about resources¶
Note
This plugin is part of the redhat.satellite collection (version 1.5.0).
To install it use: ansible-galaxy collection install redhat.satellite
.
To use it in a playbook, specify: redhat.satellite.resource_info
.
New in version 1.0.0: of redhat.satellite
Parameters¶
Notes¶
Note
Some resources don’t support scoping and will return errors when you pass organization or unknown data in params.
Examples¶
- name: "Read a Setting"
redhat.satellite.resource_info:
username: "admin"
password: "changeme"
server_url: "https://satellite.example.com"
resource: settings
search: name = foreman_url
register: result
- debug:
var: result.resources[0].value
- name: "Read all Registries"
redhat.satellite.resource_info:
username: "admin"
password: "changeme"
server_url: "https://satellite.example.com"
resource: registries
register: result
- debug:
var: item.name
with_items: "{{ result.resources }}"
- name: "Read all Organizations with full details"
redhat.satellite.resource_info:
username: "admin"
password: "changeme"
server_url: "https://satellite.example.com"
resource: organizations
full_details: true
register: result
- debug:
var: result.resources
- name: Get all existing subscriptions for organization with id 1
redhat.satellite.resource_info:
username: "admin"
password: "changeme"
server_url: "https://satellite.example.com"
resource: subscriptions
params:
organization_id: 1
register: result
- debug:
var: result
- name: Get all existing activation keys for organization ACME
redhat.satellite.resource_info:
username: "admin"
password: "changeme"
server_url: "https://satellite.example.com"
resource: activation_keys
organization: ACME
register: result
- debug:
var: result
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
resources
list
/ elements=string
|
always |
Resource information
|
Authors¶
Sean O’Keeffe (@sean797)