mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-03 04:34:24 -07:00
complete plugin docs (#42355)
* complete plugin docs * add missing 'plugin' option * user and password are now 'correctly' required * added inventory source example and extension information for user
This commit is contained in:
parent
b21c7c0232
commit
8e1d223301
1 changed files with 16 additions and 0 deletions
|
@ -12,16 +12,23 @@ DOCUMENTATION = '''
|
||||||
version_added: "2.6"
|
version_added: "2.6"
|
||||||
description:
|
description:
|
||||||
- Get inventory hosts from the foreman service.
|
- Get inventory hosts from the foreman service.
|
||||||
|
- "Uses a configuration file as an inventory source, it must end in foreman.yml or foreman.yaml and has a ``plugin: foreman`` entry."
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
- inventory_cache
|
- inventory_cache
|
||||||
options:
|
options:
|
||||||
|
plugin:
|
||||||
|
description: the name of this plugin, it should alwys be set to 'foreman' for this plugin to recognize it as it's own.
|
||||||
|
required: True
|
||||||
|
choices: ['foreman']
|
||||||
url:
|
url:
|
||||||
description: url to foreman
|
description: url to foreman
|
||||||
default: 'http://localhost:300'
|
default: 'http://localhost:300'
|
||||||
user:
|
user:
|
||||||
description: foreman authentication user
|
description: foreman authentication user
|
||||||
|
required: True
|
||||||
password:
|
password:
|
||||||
description: forman authentication password
|
description: forman authentication password
|
||||||
|
required: True
|
||||||
validate_certs:
|
validate_certs:
|
||||||
description: verify SSL certificate if using https
|
description: verify SSL certificate if using https
|
||||||
type: boolean
|
type: boolean
|
||||||
|
@ -42,6 +49,15 @@ DOCUMENTATION = '''
|
||||||
default: False
|
default: False
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
EXAMPLES = '''
|
||||||
|
# my.foreman.yml
|
||||||
|
plugin: foreman
|
||||||
|
url: http://localhost:2222
|
||||||
|
user: ansible-tester
|
||||||
|
password: secure
|
||||||
|
validate_certs: False
|
||||||
|
'''
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from collections import MutableMapping
|
from collections import MutableMapping
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue