modules: fix examples to use FQCN (#644)

* modules: fix examples to use FQCN

* fix

* fix

* fix
This commit is contained in:
Andrew Klychkov
2020-07-13 22:50:31 +03:00
committed by GitHub
parent 8b92e0454d
commit 41cfdda6a3
533 changed files with 2130 additions and 2130 deletions

View File

@@ -130,7 +130,7 @@ EXAMPLES = '''
# Fetch metrics about the CPU load every 60 seconds,
# the sensu server has a handler called 'relay' which forwards stats to graphite
- name: Get cpu metrics
sensu_check:
community.general.sensu_check:
name: cpu_load
command: /etc/sensu/plugins/system/cpu-mpstat-metrics.rb
metric: yes
@@ -140,7 +140,7 @@ EXAMPLES = '''
# Check whether nginx is running
- name: Check nginx process
sensu_check:
community.general.sensu_check:
name: nginx_running
command: /etc/sensu/plugins/processes/check-procs.rb -f /var/run/nginx.pid
handlers: default
@@ -151,7 +151,7 @@ EXAMPLES = '''
# Note that the check will still show up in the sensu dashboard,
# to remove it completely you need to issue a DELETE request to the sensu api.
- name: Check disk
sensu_check:
community.general.sensu_check:
name: check_disk_capacity
state: absent
'''

View File

@@ -83,13 +83,13 @@ notes:
EXAMPLES = '''
# Minimum possible configuration
- name: Configure Sensu client
sensu_client:
community.general.sensu_client:
subscriptions:
- default
# With customization
- name: Configure Sensu client
sensu_client:
community.general.sensu_client:
name: "{{ ansible_fqdn }}"
address: "{{ ansible_default_ipv4['address'] }}"
subscriptions:
@@ -121,7 +121,7 @@ EXAMPLES = '''
mode: "0600"
- name: Delete the Sensu client configuration
sensu_client:
community.general.sensu_client:
state: "absent"
'''

View File

@@ -84,7 +84,7 @@ notes:
EXAMPLES = '''
# Configure a handler that sends event data as STDIN (pipe)
- name: Configure IRC Sensu handler
sensu_handler:
community.general.sensu_handler:
name: "irc_handler"
type: "pipe"
command: "/usr/local/bin/notify-irc.sh"
@@ -100,13 +100,13 @@ EXAMPLES = '''
# Delete a handler
- name: Delete IRC Sensu handler
sensu_handler:
community.general.sensu_handler:
name: "irc_handler"
state: "absent"
# Example of a TCP handler
- name: Configure TCP Sensu handler
sensu_handler:
community.general.sensu_handler:
name: "tcp_handler"
type: "tcp"
timeout: 30

View File

@@ -59,14 +59,14 @@ options:
EXAMPLES = '''
# Silence ALL checks for a given client
- name: Silence server1.example.dev
sensu_silence:
community.general.sensu_silence:
subscription: client:server1.example.dev
creator: "{{ ansible_user_id }}"
reason: Performing maintenance
# Silence specific check for a client
- name: Silence CPU_Usage check for server1.example.dev
sensu_silence:
community.general.sensu_silence:
subscription: client:server1.example.dev
check: CPU_Usage
creator: "{{ ansible_user_id }}"
@@ -80,7 +80,7 @@ EXAMPLES = '''
reason: 'Deployment in progress'
- name: Silence several clients from a dict
sensu_silence:
community.general.sensu_silence:
subscription: "client:{{ item.key }}"
reason: "{{ item.value.reason }}"
creator: "{{ ansible_user_id }}"

View File

@@ -52,11 +52,11 @@ reasons:
EXAMPLES = '''
# Subscribe to the nginx channel
- name: Subscribe to nginx checks
sensu_subscription: name=nginx
community.general.sensu_subscription: name=nginx
# Unsubscribe from the common checks channel
- name: Unsubscribe from common checks
sensu_subscription: name=common state=absent
community.general.sensu_subscription: name=common state=absent
'''
import json