1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

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

This commit is contained in:
Fabio Alessandro Locati 2016-12-10 15:24:13 +01:00 committed by John R Barker
parent a8fa008bbe
commit e32b0da0b0

View file

@ -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
```
---
- 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:
logicmonitor_facts:
target: host
company: '{{ company }}'
user: '{{ user }}'
password: '{{ password }}'
```
#example of querying a hostgroup - name: query a list of hosts
``` logicmonitor_facts:
--- target: host
- hosts: somemachine.superheroes.com company: yourcompany
user: root user: Luigi
vars: password: ImaLuigi,number1!
company: 'yourcompany' delegate_to: localhost
user: 'mario'
password: 'itsame.Mario!' - name: query a host group
tasks: logicmonitor_facts:
- name: query a host group target: hostgroup
# All tasks should use local_action fullpath: /servers/production
local_action: company: yourcompany
logicmonitor_facts: user: mario
target: hostgroup password: itsame.Mario!
fullpath: '/servers/production' delegate_to: localhost
company: '{{ company }}'
user: '{{ user }}'
password: '{{ password }}'
```
''' '''