Improve examples - monitoring/logicmonitor_facts.py (#19158)

pull/19164/head
Fabio Alessandro Locati 8 years ago committed by John R Barker
parent a8fa008bbe
commit e32b0da0b0

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

Loading…
Cancel
Save