|
|
@ -120,46 +120,24 @@ options:
|
|
|
|
'''
|
|
|
|
'''
|
|
|
|
|
|
|
|
|
|
|
|
EXAMPLES = '''
|
|
|
|
EXAMPLES = '''
|
|
|
|
#example of querying a list of hosts
|
|
|
|
# Always run those modules on localhost using delegate_to:localhost, or localaction
|
|
|
|
```
|
|
|
|
|
|
|
|
---
|
|
|
|
- name: query a list of hosts
|
|
|
|
- hosts: hosts
|
|
|
|
logicmonitor_facts:
|
|
|
|
user: root
|
|
|
|
target: host
|
|
|
|
vars:
|
|
|
|
company: yourcompany
|
|
|
|
company: 'yourcompany'
|
|
|
|
user: Luigi
|
|
|
|
user: 'Luigi'
|
|
|
|
password: ImaLuigi,number1!
|
|
|
|
password: 'ImaLuigi,number1!'
|
|
|
|
delegate_to: localhost
|
|
|
|
tasks:
|
|
|
|
|
|
|
|
- name: query a list of hosts
|
|
|
|
- name: query a host group
|
|
|
|
# All tasks should use local_action
|
|
|
|
logicmonitor_facts:
|
|
|
|
local_action:
|
|
|
|
target: hostgroup
|
|
|
|
logicmonitor_facts:
|
|
|
|
fullpath: /servers/production
|
|
|
|
target: host
|
|
|
|
company: yourcompany
|
|
|
|
company: '{{ company }}'
|
|
|
|
user: mario
|
|
|
|
user: '{{ user }}'
|
|
|
|
password: itsame.Mario!
|
|
|
|
password: '{{ password }}'
|
|
|
|
delegate_to: localhost
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#example of querying a hostgroup
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
- hosts: somemachine.superheroes.com
|
|
|
|
|
|
|
|
user: root
|
|
|
|
|
|
|
|
vars:
|
|
|
|
|
|
|
|
company: 'yourcompany'
|
|
|
|
|
|
|
|
user: 'mario'
|
|
|
|
|
|
|
|
password: 'itsame.Mario!'
|
|
|
|
|
|
|
|
tasks:
|
|
|
|
|
|
|
|
- name: query a host group
|
|
|
|
|
|
|
|
# All tasks should use local_action
|
|
|
|
|
|
|
|
local_action:
|
|
|
|
|
|
|
|
logicmonitor_facts:
|
|
|
|
|
|
|
|
target: hostgroup
|
|
|
|
|
|
|
|
fullpath: '/servers/production'
|
|
|
|
|
|
|
|
company: '{{ company }}'
|
|
|
|
|
|
|
|
user: '{{ user }}'
|
|
|
|
|
|
|
|
password: '{{ password }}'
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
'''
|
|
|
|
'''
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|