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

Fix Ansible documentation in part of example formatting (#334)

This commit is contained in:
Andrew Klychkov 2020-05-15 13:12:41 +03:00 committed by GitHub
parent 58ed77e851
commit 983d937b7b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
58 changed files with 376 additions and 353 deletions

View file

@ -126,7 +126,7 @@ EXAMPLES = '''
project_id: 53000fb2-ee46-4673-93a8-de2c2bdba33b project_id: 53000fb2-ee46-4673-93a8-de2c2bdba33b
tasks: tasks:
- name: test create volume - name: Create volume
packet_volume: packet_volume:
description: "{{ volname }}" description: "{{ volname }}"
project_id: "{{ project_id }}" project_id: "{{ project_id }}"
@ -139,7 +139,7 @@ EXAMPLES = '''
snapshot_frequency: 1day snapshot_frequency: 1day
register: result_create register: result_create
- name: test delete volume - name: Delete volume
packet_volume: packet_volume:
id: "{{ result_create.id }}" id: "{{ result_create.id }}"
project_id: "{{ project_id }}" project_id: "{{ project_id }}"

View file

@ -77,7 +77,7 @@ EXAMPLES = '''
project_id: 52000fb2-ee46-4673-93a8-de2c2bdba33b project_id: 52000fb2-ee46-4673-93a8-de2c2bdba33b
tasks: tasks:
- name: test create volume - name: Create volume
packet_volume: packet_volume:
description: "{{ volname }}" description: "{{ volname }}"
project_id: "{{ project_id }}" project_id: "{{ project_id }}"
@ -89,7 +89,8 @@ EXAMPLES = '''
snapshot_count: 10 snapshot_count: 10
snapshot_frequency: 1day snapshot_frequency: 1day
- packet_device: - name: Create a device
packet_device:
project_id: "{{ project_id }}" project_id: "{{ project_id }}"
hostnames: "{{ devname }}" hostnames: "{{ devname }}"
operating_system: ubuntu_16_04 operating_system: ubuntu_16_04
@ -109,7 +110,6 @@ EXAMPLES = '''
volume: "{{ volname }}" volume: "{{ volname }}"
device: "{{ devname }}" device: "{{ devname }}"
state: absent state: absent
''' '''
RETURN = ''' RETURN = '''

View file

@ -115,9 +115,9 @@ EXAMPLES = '''
# Note: These examples do not set authentication details, see the AWS Guide for details. # Note: These examples do not set authentication details, see the AWS Guide for details.
# Provisioning example. This will create three servers and enumerate their names. # Provisioning example
- name: Create three servers and enumerate their names
- profitbricks: profitbricks:
datacenter: Tardis One datacenter: Tardis One
name: web%02d.stackpointcloud.com name: web%02d.stackpointcloud.com
cores: 4 cores: 4
@ -129,9 +129,8 @@ EXAMPLES = '''
count: 3 count: 3
assign_public_ip: true assign_public_ip: true
# Removing Virtual machines - name: Remove virtual machines
profitbricks:
- profitbricks:
datacenter: Tardis One datacenter: Tardis One
instance_ids: instance_ids:
- 'web001.stackpointcloud.com' - 'web001.stackpointcloud.com'
@ -140,9 +139,8 @@ EXAMPLES = '''
wait_timeout: 500 wait_timeout: 500
state: absent state: absent
# Starting Virtual Machines. - name: Start virtual machines
profitbricks:
- profitbricks:
datacenter: Tardis One datacenter: Tardis One
instance_ids: instance_ids:
- 'web001.stackpointcloud.com' - 'web001.stackpointcloud.com'
@ -151,9 +149,8 @@ EXAMPLES = '''
wait_timeout: 500 wait_timeout: 500
state: running state: running
# Stopping Virtual Machines - name: Stop virtual machines
profitbricks:
- profitbricks:
datacenter: Tardis One datacenter: Tardis One
instance_ids: instance_ids:
- 'web001.stackpointcloud.com' - 'web001.stackpointcloud.com'
@ -161,7 +158,6 @@ EXAMPLES = '''
- 'web003.stackpointcloud.com' - 'web003.stackpointcloud.com'
wait_timeout: 500 wait_timeout: 500
state: stopped state: stopped
''' '''
import re import re

View file

@ -58,18 +58,16 @@ author: Matt Baldwin (@baldwinSPC) <baldwin@stackpointcloud.com>
''' '''
EXAMPLES = ''' EXAMPLES = '''
- name: Create a datacenter
# Create a Datacenter profitbricks_datacenter:
- profitbricks_datacenter:
datacenter: Tardis One datacenter: Tardis One
wait_timeout: 500 wait_timeout: 500
# Destroy a Datacenter. This will remove all servers, volumes, and other objects in the datacenter. - name: Destroy a datacenter (remove all servers, volumes, and other objects in the datacenter)
- profitbricks_datacenter: profitbricks_datacenter:
datacenter: Tardis One datacenter: Tardis One
wait_timeout: 500 wait_timeout: 500
state: absent state: absent
''' '''
import re import re

View file

@ -59,23 +59,21 @@ author: Matt Baldwin (@baldwinSPC) <baldwin@stackpointcloud.com>
''' '''
EXAMPLES = ''' EXAMPLES = '''
- name: Create a NIC
# Create a NIC profitbricks_nic:
- profitbricks_nic:
datacenter: Tardis One datacenter: Tardis One
server: node002 server: node002
lan: 2 lan: 2
wait_timeout: 500 wait_timeout: 500
state: present state: present
# Remove a NIC - name: Remove a NIC
- profitbricks_nic: profitbricks_nic:
datacenter: Tardis One datacenter: Tardis One
server: node002 server: node002
name: 7341c2454f name: 7341c2454f
wait_timeout: 500 wait_timeout: 500
state: absent state: absent
''' '''
import re import re

View file

@ -100,10 +100,8 @@ author: Matt Baldwin (@baldwinSPC) <baldwin@stackpointcloud.com>
''' '''
EXAMPLES = ''' EXAMPLES = '''
- name: Create multiple volumes
# Create Multiple Volumes profitbricks_volume:
- profitbricks_volume:
datacenter: Tardis One datacenter: Tardis One
name: vol%02d name: vol%02d
count: 5 count: 5
@ -111,16 +109,14 @@ EXAMPLES = '''
wait_timeout: 500 wait_timeout: 500
state: present state: present
# Remove Volumes - name: Remove Volumes
profitbricks_volume:
- profitbricks_volume:
datacenter: Tardis One datacenter: Tardis One
instance_ids: instance_ids:
- 'vol01' - 'vol01'
- 'vol02' - 'vol02'
wait_timeout: 500 wait_timeout: 500
state: absent state: absent
''' '''
import re import re

View file

@ -55,25 +55,21 @@ author: Matt Baldwin (@baldwinSPC) <baldwin@stackpointcloud.com>
''' '''
EXAMPLES = ''' EXAMPLES = '''
- name: Attach a volume
# Attach a Volume profitbricks_volume_attachments:
- profitbricks_volume_attachments:
datacenter: Tardis One datacenter: Tardis One
server: node002 server: node002
volume: vol01 volume: vol01
wait_timeout: 500 wait_timeout: 500
state: present state: present
# Detach a Volume - name: Detach a volume
profitbricks_volume_attachments:
- profitbricks_volume_attachments:
datacenter: Tardis One datacenter: Tardis One
server: node002 server: node002
volume: vol01 volume: vol01
wait_timeout: 500 wait_timeout: 500
state: absent state: absent
''' '''
import re import re

View file

@ -76,8 +76,8 @@ extends_documentation_fragment:
''' '''
EXAMPLES = ''' EXAMPLES = '''
# Add a new node to the load balancer - name: Add a new node to the load balancer
- local_action: local_action:
module: rax_clb_nodes module: rax_clb_nodes
load_balancer_id: 71 load_balancer_id: 71
address: 10.2.2.3 address: 10.2.2.3
@ -87,8 +87,8 @@ EXAMPLES = '''
wait: yes wait: yes
credentials: /path/to/credentials credentials: /path/to/credentials
# Drain connections from a node - name: Drain connections from a node
- local_action: local_action:
module: rax_clb_nodes module: rax_clb_nodes
load_balancer_id: 71 load_balancer_id: 71
node_id: 410 node_id: 410
@ -96,8 +96,8 @@ EXAMPLES = '''
wait: yes wait: yes
credentials: /path/to/credentials credentials: /path/to/credentials
# Remove a node from the load balancer - name: Remove a node from the load balancer
- local_action: local_action:
module: rax_clb_nodes module: rax_clb_nodes
load_balancer_id: 71 load_balancer_id: 71
node_id: 410 node_id: 410

View file

@ -59,19 +59,18 @@ options:
''' '''
EXAMPLES = ''' EXAMPLES = '''
- name: Create an IP - name: Create an IP
scaleway_ip: scaleway_ip:
organization: '{{ scw_org }}' organization: '{{ scw_org }}'
state: present state: present
region: par1 region: par1
register: ip_creation_task register: ip_creation_task
- name: Make sure IP deleted
scaleway_ip:
id: '{{ ip_creation_task.scaleway_ip.id }}'
state: absent
region: par1
- name: Make sure IP deleted
scaleway_ip:
id: '{{ ip_creation_task.scaleway_ip.id }}'
state: absent
region: par1
''' '''
RETURN = ''' RETURN = '''

View file

@ -83,18 +83,18 @@ options:
''' '''
EXAMPLES = ''' EXAMPLES = '''
- name: Create a Security Group - name: Create a Security Group
scaleway_security_group: scaleway_security_group:
state: present state: present
region: par1 region: par1
name: security_group name: security_group
description: "my security group description" description: "my security group description"
organization: "43a3b6c8-916f-477b-b7ec-ff1898f5fdd9" organization: "43a3b6c8-916f-477b-b7ec-ff1898f5fdd9"
stateful: false stateful: false
inbound_default_policy: accept inbound_default_policy: accept
outbound_default_policy: accept outbound_default_policy: accept
organization_default: false organization_default: false
register: security_group_creation_task register: security_group_creation_task
''' '''
RETURN = ''' RETURN = '''

View file

@ -55,22 +55,21 @@ options:
''' '''
EXAMPLES = ''' EXAMPLES = '''
- name: Create 10GB volume - name: Create 10GB volume
scaleway_volume: scaleway_volume:
name: my-volume name: my-volume
state: present state: present
region: par1 region: par1
organization: "{{ scw_org }}" organization: "{{ scw_org }}"
"size": 10000000000 "size": 10000000000
volume_type: l_ssd volume_type: l_ssd
register: server_creation_check_task register: server_creation_check_task
- name: Make sure volume deleted
scaleway_volume:
name: my-volume
state: absent
region: par1
- name: Make sure volume deleted
scaleway_volume:
name: my-volume
state: absent
region: par1
''' '''
RETURN = ''' RETURN = '''

View file

@ -27,27 +27,32 @@ options:
''' '''
EXAMPLES = ''' EXAMPLES = '''
# Return information about all installed images. - name: Return information about all installed images
- smartos_image_info: smartos_image_info:
register: result register: result
# Return all private active Linux images. - name: Return all private active Linux images
- smartos_image_info: filters="os=linux state=active public=false" smartos_image_info:
filters: "os=linux state=active public=false"
register: result register: result
# Show, how many clones does every image have. - name: Show, how many clones does every image have
- smartos_image_info: smartos_image_info:
register: result register: result
- debug: msg="{{ result.smartos_images[item]['name'] }}-{{ result.smartos_images[item]['version'] }} - name: Print information
has {{ result.smartos_images[item]['clones'] }} VM(s)" debug:
msg: "{{ result.smartos_images[item]['name'] }}-{{ result.smartos_images[item]['version'] }}
has {{ result.smartos_images[item]['clones'] }} VM(s)"
with_items: "{{ result.smartos_images.keys() | list }}" with_items: "{{ result.smartos_images.keys() | list }}"
# When the module is called as smartos_image_facts, return values are published # When the module is called as smartos_image_facts, return values are published
# in ansible_facts['smartos_images'] and can be used as follows. # in ansible_facts['smartos_images'] and can be used as follows.
# Note that this is deprecated and will stop working in Ansible 2.13. # Note that this is deprecated and will stop working in Ansible 2.13.
- debug: msg="{{ smartos_images[item]['name'] }}-{{ smartos_images[item]['version'] }} - name: Print information
has {{ smartos_images[item]['clones'] }} VM(s)" debug:
msg: "{{ smartos_images[item]['name'] }}-{{ smartos_images[item]['version'] }}
has {{ smartos_images[item]['clones'] }} VM(s)"
with_items: "{{ smartos_images.keys() | list }}" with_items: "{{ smartos_images.keys() | list }}"
''' '''

View file

@ -466,7 +466,7 @@ EXAMPLES = '''
- hosts: localhost - hosts: localhost
tasks: tasks:
- name: create elastigroup - name: Create elastigroup
spotinst_aws_elastigroup: spotinst_aws_elastigroup:
state: present state: present
risk: 100 risk: 100
@ -500,7 +500,7 @@ EXAMPLES = '''
- hosts: localhost - hosts: localhost
tasks: tasks:
- name: create elastigroup - name: Create elastigroup
spotinst_aws_elastigroup: spotinst_aws_elastigroup:
state: present state: present
account_id: act-1a9dd2b account_id: act-1a9dd2b
@ -547,7 +547,7 @@ EXAMPLES = '''
- hosts: localhost - hosts: localhost
tasks: tasks:
- name: create elastigroup - name: Create elastigroup
spotinst_aws_elastigroup: spotinst_aws_elastigroup:
state: present state: present
account_id: act-1a9dd2b account_id: act-1a9dd2b
@ -597,7 +597,7 @@ EXAMPLES = '''
- hosts: localhost - hosts: localhost
tasks: tasks:
- name: create elastigroup - name: Create elastigroup
spotinst_aws_elastigroup: spotinst_aws_elastigroup:
state: present state: present
risk: 100 risk: 100
@ -637,7 +637,7 @@ EXAMPLES = '''
- hosts: localhost - hosts: localhost
tasks: tasks:
- name: create elastigroup - name: Create elastigroup
spotinst_aws_elastigroup: spotinst_aws_elastigroup:
state: present state: present
risk: 100 risk: 100
@ -675,7 +675,7 @@ EXAMPLES = '''
- hosts: localhost - hosts: localhost
tasks: tasks:
- name: create elastigroup - name: Create elastigroup
spotinst_aws_elastigroup: spotinst_aws_elastigroup:
account_id: act-92d45673 account_id: act-92d45673
state: present state: present
@ -714,8 +714,8 @@ EXAMPLES = '''
- image_id - image_id
register: result register: result
- debug: var=result - debug: var=result
''' '''
RETURN = ''' RETURN = '''
--- ---
instances: instances:

View file

@ -54,8 +54,8 @@ options:
EXAMPLES = ''' EXAMPLES = '''
# Create a DNS record on a UCS - name: Create a DNS record on a UCS
- udm_dns_record: udm_dns_record:
name: www name: www
zone: example.com zone: example.com
type: host_record type: host_record
@ -66,7 +66,7 @@ EXAMPLES = '''
''' '''
RETURN = '''# ''' RETURN = '''#'''
HAVE_UNIVENTION = False HAVE_UNIVENTION = False
try: try:

View file

@ -81,8 +81,8 @@ options:
EXAMPLES = ''' EXAMPLES = '''
# Create a DNS zone on a UCS - name: Create a DNS zone on a UCS
- udm_dns_zone: udm_dns_zone:
zone: example.com zone: example.com
type: forward_zone type: forward_zone
nameserver: nameserver:

View file

@ -52,18 +52,21 @@ options:
EXAMPLES = ''' EXAMPLES = '''
# Create a POSIX group - name: Create a POSIX group
- udm_group: udm_group:
name: g123m-1A name: g123m-1A
# Create a POSIX group with the exact DN # Create a POSIX group with the exact DN
# C(cn=g123m-1A,cn=classes,cn=students,cn=groups,ou=school,dc=school,dc=example,dc=com) # C(cn=g123m-1A,cn=classes,cn=students,cn=groups,ou=school,dc=school,dc=example,dc=com)
- udm_group: - name: Create a POSIX group with a DN
udm_group:
name: g123m-1A name: g123m-1A
subpath: 'cn=classes,cn=students,cn=groups' subpath: 'cn=classes,cn=students,cn=groups'
ou: school ou: school
# or # or
- udm_group: - name: Create a POSIX group with a DN
udm_group:
name: g123m-1A name: g123m-1A
position: 'cn=classes,cn=students,cn=groups,ou=school,dc=school,dc=example,dc=com' position: 'cn=classes,cn=students,cn=groups,ou=school,dc=school,dc=example,dc=com'
''' '''

View file

@ -292,8 +292,8 @@ options:
EXAMPLES = ''' EXAMPLES = '''
# Create a share named home on the server ucs.example.com with the path /home. - name: Create a share named home on the server ucs.example.com with the path /home
- udm_share: udm_share:
name: home name: home
path: /home path: /home
host: ucs.example.com host: ucs.example.com

View file

@ -227,24 +227,25 @@ options:
EXAMPLES = ''' EXAMPLES = '''
# Create a user on a UCS - name: Create a user on a UCS
- udm_user: udm_user:
name: FooBar name: FooBar
password: secure_password password: secure_password
firstname: Foo firstname: Foo
lastname: Bar lastname: Bar
# Create a user with the DN - name: Create a user with the DN C(uid=foo,cn=teachers,cn=users,ou=school,dc=school,dc=example,dc=com)
# C(uid=foo,cn=teachers,cn=users,ou=school,dc=school,dc=example,dc=com) udm_user:
- udm_user:
name: foo name: foo
password: secure_password password: secure_password
firstname: Foo firstname: Foo
lastname: Bar lastname: Bar
ou: school ou: school
subpath: 'cn=teachers,cn=users' subpath: 'cn=teachers,cn=users'
# or define the position # or define the position
- udm_user: - name: Create a user with the DN C(uid=foo,cn=teachers,cn=users,ou=school,dc=school,dc=example,dc=com)
udm_user:
name: foo name: foo
password: secure_password password: secure_password
firstname: Foo firstname: Foo

View file

@ -73,7 +73,7 @@ options:
''' '''
EXAMPLES = ''' EXAMPLES = '''
- name: create website - name: Create website
webfaction_site: webfaction_site:
name: testsite1 name: testsite1
state: present state: present

View file

@ -46,40 +46,40 @@ author: "Trey Perry (@treyperry)"
''' '''
EXAMPLES = """ EXAMPLES = """
# Creating or updating a znode with a given value - name: Creating or updating a znode with a given value
- znode: znode:
hosts: 'localhost:2181' hosts: 'localhost:2181'
name: /mypath name: /mypath
value: myvalue value: myvalue
state: present state: present
# Getting the value and stat structure for a znode - name: Getting the value and stat structure for a znode
- znode: znode:
hosts: 'localhost:2181' hosts: 'localhost:2181'
name: /mypath name: /mypath
op: get op: get
# Listing a particular znode's children - name: Listing a particular znode's children
- znode: znode:
hosts: 'localhost:2181' hosts: 'localhost:2181'
name: /zookeeper name: /zookeeper
op: list op: list
# Waiting 20 seconds for a znode to appear at path /mypath - name: Waiting 20 seconds for a znode to appear at path /mypath
- znode: znode:
hosts: 'localhost:2181' hosts: 'localhost:2181'
name: /mypath name: /mypath
op: wait op: wait
timeout: 20 timeout: 20
# Deleting a znode at path /mypath - name: Deleting a znode at path /mypath
- znode: znode:
hosts: 'localhost:2181' hosts: 'localhost:2181'
name: /mypath name: /mypath
state: absent state: absent
# Creating or updating a znode with a given value on a remote Zookeeper - name: Creating or updating a znode with a given value on a remote Zookeeper
- znode: znode:
hosts: 'my-zookeeper-node:2181' hosts: 'my-zookeeper-node:2181'
name: /mypath name: /mypath
value: myvalue value: myvalue

View file

@ -65,7 +65,7 @@ options:
''' '''
EXAMPLES = ''' EXAMPLES = '''
- name: "Add or update OpenDJ backend properties" - name: Add or update OpenDJ backend properties
action: opendj_backendprop action: opendj_backendprop
hostname=localhost hostname=localhost
port=4444 port=4444

View file

@ -53,7 +53,8 @@ requirements: []
''' '''
EXAMPLES = ''' EXAMPLES = '''
- airbrake_deployment: - name: Notify airbrake about an app deployment
airbrake_deployment:
token: AAAAAA token: AAAAAA
environment: staging environment: staging
user: ansible user: ansible

View file

@ -74,20 +74,23 @@ requirements: [ ]
''' '''
EXAMPLES = ''' EXAMPLES = '''
- bigpanda: - name: Notify BigPanda about a deployment
bigpanda:
component: myapp component: myapp
version: '1.3' version: '1.3'
token: '{{ bigpanda_token }}' token: '{{ bigpanda_token }}'
state: started state: started
- bigpanda: - name: Notify BigPanda about a deployment
bigpanda:
component: myapp component: myapp
version: '1.3' version: '1.3'
token: '{{ bigpanda_token }}' token: '{{ bigpanda_token }}'
state: finished state: finished
# If outside servers aren't reachable from your machine, use delegate_to and override hosts: # If outside servers aren't reachable from your machine, use delegate_to and override hosts:
- bigpanda: - name: Notify BigPanda about a deployment
bigpanda:
component: myapp component: myapp
version: '1.3' version: '1.3'
token: '{{ bigpanda_token }}' token: '{{ bigpanda_token }}'
@ -96,7 +99,8 @@ EXAMPLES = '''
delegate_to: localhost delegate_to: localhost
register: deployment register: deployment
- bigpanda: - name: Notify BigPanda about a deployment
bigpanda:
component: '{{ deployment.component }}' component: '{{ deployment.component }}'
version: '{{ deployment.version }}' version: '{{ deployment.version }}'
token: '{{ deployment.token }}' token: '{{ deployment.token }}'

View file

@ -50,21 +50,23 @@ options:
default: 0 default: 0
''' '''
EXAMPLES = ''' EXAMPLES = '''
# Create a simple annotation event with a source, defaults to start and end time of now - name: Create a simple annotation event with a source, defaults to start and end time of now
- circonus_annotation: circonus_annotation:
api_key: XXXXXXXXXXXXXXXXX api_key: XXXXXXXXXXXXXXXXX
title: App Config Change title: App Config Change
description: This is a detailed description of the config change description: This is a detailed description of the config change
category: This category groups like annotations category: This category groups like annotations
# Create an annotation with a duration of 5 minutes and a default start time of now
- circonus_annotation: - name: Create an annotation with a duration of 5 minutes and a default start time of now
circonus_annotation:
api_key: XXXXXXXXXXXXXXXXX api_key: XXXXXXXXXXXXXXXXX
title: App Config Change title: App Config Change
description: This is a detailed description of the config change description: This is a detailed description of the config change
category: This category groups like annotations category: This category groups like annotations
duration: 300 duration: 300
# Create an annotation with a start_time and end_time
- circonus_annotation: - name: Create an annotation with a start_time and end_time
circonus_annotation:
api_key: XXXXXXXXXXXXXXXXX api_key: XXXXXXXXXXXXXXXXX
title: App Config Change title: App Config Change
description: This is a detailed description of the config change description: This is a detailed description of the config change

View file

@ -64,15 +64,16 @@ options:
''' '''
EXAMPLES = ''' EXAMPLES = '''
# Post an event with low priority - name: Post an event with low priority
- datadog_event: datadog_event:
title: Testing from ansible title: Testing from ansible
text: Test text: Test
priority: low priority: low
api_key: 9775a026f1ca7d1c6c5af9d94d9595a4 api_key: 9775a026f1ca7d1c6c5af9d94d9595a4
app_key: j4JyCYfefWHhgFgiZUqRm63AXHNZQyPGBfJtAzmN app_key: j4JyCYfefWHhgFgiZUqRm63AXHNZQyPGBfJtAzmN
# Post an event with several tags
- datadog_event: - name: Post an event with several tags
datadog_event:
title: Testing from ansible title: Testing from ansible
text: Test text: Test
api_key: 9775a026f1ca7d1c6c5af9d94d9595a4 api_key: 9775a026f1ca7d1c6c5af9d94d9595a4

View file

@ -137,8 +137,8 @@ options:
''' '''
EXAMPLES = ''' EXAMPLES = '''
# Create a metric monitor - name: Create a metric monitor
- datadog_monitor: datadog_monitor:
type: "metric alert" type: "metric alert"
name: "Test monitor" name: "Test monitor"
state: "present" state: "present"
@ -147,30 +147,30 @@ EXAMPLES = '''
api_key: "9775a026f1ca7d1c6c5af9d94d9595a4" api_key: "9775a026f1ca7d1c6c5af9d94d9595a4"
app_key: "87ce4a24b5553d2e482ea8a8500e71b8ad4554ff" app_key: "87ce4a24b5553d2e482ea8a8500e71b8ad4554ff"
# Deletes a monitor - name: Deletes a monitor
- datadog_monitor: datadog_monitor:
name: "Test monitor" name: "Test monitor"
state: "absent" state: "absent"
api_key: "9775a026f1ca7d1c6c5af9d94d9595a4" api_key: "9775a026f1ca7d1c6c5af9d94d9595a4"
app_key: "87ce4a24b5553d2e482ea8a8500e71b8ad4554ff" app_key: "87ce4a24b5553d2e482ea8a8500e71b8ad4554ff"
# Mutes a monitor - name: Mutes a monitor
- datadog_monitor: datadog_monitor:
name: "Test monitor" name: "Test monitor"
state: "mute" state: "mute"
silenced: '{"*":None}' silenced: '{"*":None}'
api_key: "9775a026f1ca7d1c6c5af9d94d9595a4" api_key: "9775a026f1ca7d1c6c5af9d94d9595a4"
app_key: "87ce4a24b5553d2e482ea8a8500e71b8ad4554ff" app_key: "87ce4a24b5553d2e482ea8a8500e71b8ad4554ff"
# Unmutes a monitor - name: Unmutes a monitor
- datadog_monitor: datadog_monitor:
name: "Test monitor" name: "Test monitor"
state: "unmute" state: "unmute"
api_key: "9775a026f1ca7d1c6c5af9d94d9595a4" api_key: "9775a026f1ca7d1c6c5af9d94d9595a4"
app_key: "87ce4a24b5553d2e482ea8a8500e71b8ad4554ff" app_key: "87ce4a24b5553d2e482ea8a8500e71b8ad4554ff"
# Use datadoghq.eu platform instead of datadoghq.com - name: Use datadoghq.eu platform instead of datadoghq.com
- datadog_monitor: datadog_monitor:
name: "Test monitor" name: "Test monitor"
state: "absent" state: "absent"
api_host: https://api.datadoghq.eu api_host: https://api.datadoghq.eu

View file

@ -46,7 +46,8 @@ options:
''' '''
EXAMPLES = ''' EXAMPLES = '''
- honeybadger_deployment: - name: Notify Honeybadger.io about an app deployment
honeybadger_deployment:
token: AAAAAA token: AAAAAA
environment: staging environment: staging
user: ansible user: ansible

View file

@ -60,16 +60,16 @@ options:
''' '''
EXAMPLES = ''' EXAMPLES = '''
# Create a simple annotation event with a source - name: Create a simple annotation event with a source
- librato_annotation: librato_annotation:
user: user@example.com user: user@example.com
api_key: XXXXXXXXXXXXXXXXX api_key: XXXXXXXXXXXXXXXXX
title: App Config Change title: App Config Change
source: foo.bar source: foo.bar
description: This is a detailed description of the config change description: This is a detailed description of the config change
# Create an annotation that includes a link - name: Create an annotation that includes a link
- librato_annotation: librato_annotation:
user: user@example.com user: user@example.com
api_key: XXXXXXXXXXXXXXXXXX api_key: XXXXXXXXXXXXXXXXXX
name: code.deploy name: code.deploy
@ -79,8 +79,8 @@ EXAMPLES = '''
- rel: example - rel: example
href: http://www.example.com/deploy href: http://www.example.com/deploy
# Create an annotation with a start_time and end_time - name: Create an annotation with a start_time and end_time
- librato_annotation: librato_annotation:
user: user@example.com user: user@example.com
api_key: XXXXXXXXXXXXXXXXXX api_key: XXXXXXXXXXXXXXXXXX
name: maintenance name: maintenance

View file

@ -39,14 +39,14 @@ notes:
- Requires the LogEntries agent which can be installed following the instructions at logentries.com - Requires the LogEntries agent which can be installed following the instructions at logentries.com
''' '''
EXAMPLES = ''' EXAMPLES = '''
# Track nginx logs - name: Track nginx logs
- logentries: logentries:
path: /var/log/nginx/access.log path: /var/log/nginx/access.log
state: present state: present
name: nginx-access-log name: nginx-access-log
# Stop tracking nginx logs - name: Stop tracking nginx logs
- logentries: logentries:
path: /var/log/nginx/error.log path: /var/log/nginx/error.log
state: absent state: absent
''' '''

View file

@ -34,8 +34,8 @@ author: "Darryl Stoflet (@dstoflet)"
''' '''
EXAMPLES = ''' EXAMPLES = '''
# Manage the state of program "httpd" to be in "started" state. - name: Manage the state of program httpd to be in started state
- monit: monit:
name: httpd name: httpd
state: started state: started
''' '''

View file

@ -85,114 +85,114 @@ author: "Tim Bielawa (@tbielawa)"
''' '''
EXAMPLES = ''' EXAMPLES = '''
# set 30 minutes of apache downtime - name: Set 30 minutes of apache downtime
- nagios: nagios:
action: downtime action: downtime
minutes: 30 minutes: 30
service: httpd service: httpd
host: '{{ inventory_hostname }}' host: '{{ inventory_hostname }}'
# schedule an hour of HOST downtime - name: Schedule an hour of HOST downtime
- nagios: nagios:
action: downtime action: downtime
minutes: 60 minutes: 60
service: host service: host
host: '{{ inventory_hostname }}' host: '{{ inventory_hostname }}'
# schedule an hour of HOST downtime starting at 2019-04-23T02:00:00+00:00 - name: Schedule an hour of HOST downtime starting at 2019-04-23T02:00:00+00:00
- nagios: nagios:
action: downtime action: downtime
start: 1555984800 start: 1555984800
minutes: 60 minutes: 60
service: host service: host
host: '{{ inventory_hostname }}' host: '{{ inventory_hostname }}'
# schedule an hour of HOST downtime, with a comment describing the reason - name: Schedule an hour of HOST downtime, with a comment describing the reason
- nagios: nagios:
action: downtime action: downtime
minutes: 60 minutes: 60
service: host service: host
host: '{{ inventory_hostname }}' host: '{{ inventory_hostname }}'
comment: Rebuilding machine comment: Rebuilding machine
# schedule downtime for ALL services on HOST - name: Schedule downtime for ALL services on HOST
- nagios: nagios:
action: downtime action: downtime
minutes: 45 minutes: 45
service: all service: all
host: '{{ inventory_hostname }}' host: '{{ inventory_hostname }}'
# schedule downtime for a few services - name: Schedule downtime for a few services
- nagios: nagios:
action: downtime action: downtime
services: frob,foobar,qeuz services: frob,foobar,qeuz
host: '{{ inventory_hostname }}' host: '{{ inventory_hostname }}'
# set 30 minutes downtime for all services in servicegroup foo - name: Set 30 minutes downtime for all services in servicegroup foo
- nagios: nagios:
action: servicegroup_service_downtime action: servicegroup_service_downtime
minutes: 30 minutes: 30
servicegroup: foo servicegroup: foo
host: '{{ inventory_hostname }}' host: '{{ inventory_hostname }}'
# set 30 minutes downtime for all host in servicegroup foo - name: Set 30 minutes downtime for all host in servicegroup foo
- nagios: nagios:
action: servicegroup_host_downtime action: servicegroup_host_downtime
minutes: 30 minutes: 30
servicegroup: foo servicegroup: foo
host: '{{ inventory_hostname }}' host: '{{ inventory_hostname }}'
# delete all downtime for a given host - name: Delete all downtime for a given host
- nagios: nagios:
action: delete_downtime action: delete_downtime
host: '{{ inventory_hostname }}' host: '{{ inventory_hostname }}'
service: all service: all
# delete all downtime for HOST with a particular comment - name: Delete all downtime for HOST with a particular comment
- nagios: nagios:
action: delete_downtime action: delete_downtime
host: '{{ inventory_hostname }}' host: '{{ inventory_hostname }}'
service: host service: host
comment: Planned maintenance comment: Planned maintenance
# enable SMART disk alerts - name: Enable SMART disk alerts
- nagios: nagios:
action: enable_alerts action: enable_alerts
service: smart service: smart
host: '{{ inventory_hostname }}' host: '{{ inventory_hostname }}'
# "two services at once: disable httpd and nfs alerts" - name: Disable httpd and nfs alerts
- nagios: nagios:
action: disable_alerts action: disable_alerts
service: httpd,nfs service: httpd,nfs
host: '{{ inventory_hostname }}' host: '{{ inventory_hostname }}'
# disable HOST alerts - name: Disable HOST alerts
- nagios: nagios:
action: disable_alerts action: disable_alerts
service: host service: host
host: '{{ inventory_hostname }}' host: '{{ inventory_hostname }}'
# silence ALL alerts - name: Silence ALL alerts
- nagios: nagios:
action: silence action: silence
host: '{{ inventory_hostname }}' host: '{{ inventory_hostname }}'
# unsilence all alerts - name: Unsilence all alerts
- nagios: nagios:
action: unsilence action: unsilence
host: '{{ inventory_hostname }}' host: '{{ inventory_hostname }}'
# SHUT UP NAGIOS - name: Shut up nagios
- nagios: nagios:
action: silence_nagios action: silence_nagios
# ANNOY ME NAGIOS - name: Annoy me negios
- nagios: nagios:
action: unsilence_nagios action: unsilence_nagios
# command something - name: Command something
- nagios: nagios:
action: command action: command
command: DISABLE_FAILURE_PREDICTION command: DISABLE_FAILURE_PREDICTION
''' '''

View file

@ -64,7 +64,8 @@ requirements: []
''' '''
EXAMPLES = ''' EXAMPLES = '''
- newrelic_deployment: - name: Notify newrelic about an app deployment
newrelic_deployment:
token: AAAAAA token: AAAAAA
app_name: myapp app_name: myapp
user: ansible deployment user: ansible deployment

View file

@ -68,22 +68,22 @@ options:
''' '''
EXAMPLES = ''' EXAMPLES = '''
# List ongoing maintenance windows using a token - name: List ongoing maintenance windows using a token
- pagerduty: pagerduty:
name: companyabc name: companyabc
token: xxxxxxxxxxxxxx token: xxxxxxxxxxxxxx
state: ongoing state: ongoing
# Create a 1 hour maintenance window for service FOO123 - name: Create a 1 hour maintenance window for service FOO123
- pagerduty: pagerduty:
name: companyabc name: companyabc
user: example@example.com user: example@example.com
token: yourtoken token: yourtoken
state: running state: running
service: FOO123 service: FOO123
# Create a 5 minute maintenance window for service FOO123 - name: Create a 5 minute maintenance window for service FOO123
- pagerduty: pagerduty:
name: companyabc name: companyabc
token: xxxxxxxxxxxxxx token: xxxxxxxxxxxxxx
hours: 0 hours: 0
@ -92,8 +92,8 @@ EXAMPLES = '''
service: FOO123 service: FOO123
# Create a 4 hour maintenance window for service FOO123 with the description "deployment". - name: Create a 4 hour maintenance window for service FOO123 with the description "deployment"
- pagerduty: pagerduty:
name: companyabc name: companyabc
user: example@example.com user: example@example.com
state: running state: running
@ -102,26 +102,28 @@ EXAMPLES = '''
desc: deployment desc: deployment
register: pd_window register: pd_window
# Delete the previous maintenance window - name: Delete the previous maintenance window
- pagerduty: pagerduty:
name: companyabc name: companyabc
user: example@example.com user: example@example.com
state: absent state: absent
window_id: '{{ pd_window.result.maintenance_window.id }}' window_id: '{{ pd_window.result.maintenance_window.id }}'
# Delete a maintenance window from a separate playbook than its creation, and if it is the only existing maintenance window. # Delete a maintenance window from a separate playbook than its creation,
- pagerduty: # and if it is the only existing maintenance window
- name: Check
pagerduty:
requester_id: XXXXXXX requester_id: XXXXXXX
token: yourtoken token: yourtoken
state: ongoing state: ongoing
register: pd_window register: pd_window
- pagerduty: - name: Delete
pagerduty:
requester_id: XXXXXXX requester_id: XXXXXXX
token: yourtoken token: yourtoken
state: absent state: absent
window_id: "{{ pd_window.result.maintenance_windows[0].id }}" window_id: "{{ pd_window.result.maintenance_windows[0].id }}"
''' '''
import datetime import datetime

View file

@ -73,8 +73,8 @@ options:
''' '''
EXAMPLES = ''' EXAMPLES = '''
# Trigger an incident with just the basic options - name: Trigger an incident with just the basic options
- pagerduty_alert: pagerduty_alert:
name: companyabc name: companyabc
integration_key: xxx integration_key: xxx
api_key: yourapikey api_key: yourapikey
@ -82,8 +82,8 @@ EXAMPLES = '''
state: triggered state: triggered
desc: problem that led to this trigger desc: problem that led to this trigger
# Trigger an incident with more options - name: Trigger an incident with more options
- pagerduty_alert: pagerduty_alert:
integration_key: xxx integration_key: xxx
api_key: yourapikey api_key: yourapikey
service_id: PDservice service_id: PDservice
@ -93,8 +93,8 @@ EXAMPLES = '''
client: Sample Monitoring Service client: Sample Monitoring Service
client_url: http://service.example.com client_url: http://service.example.com
# Acknowledge an incident based on incident_key - name: Acknowledge an incident based on incident_key
- pagerduty_alert: pagerduty_alert:
integration_key: xxx integration_key: xxx
api_key: yourapikey api_key: yourapikey
service_id: PDservice service_id: PDservice
@ -102,8 +102,8 @@ EXAMPLES = '''
incident_key: somekey incident_key: somekey
desc: "some text for incident's log" desc: "some text for incident's log"
# Resolve an incident based on incident_key - name: Resolve an incident based on incident_key
- pagerduty_alert: pagerduty_alert:
integration_key: xxx integration_key: xxx
api_key: yourapikey api_key: yourapikey
service_id: PDservice service_id: PDservice

View file

@ -45,16 +45,16 @@ notes:
''' '''
EXAMPLES = ''' EXAMPLES = '''
# Pause the check with the ID of 12345. - name: Pause the check with the ID of 12345
- pingdom: pingdom:
uid: example@example.com uid: example@example.com
passwd: password123 passwd: password123
key: apipassword123 key: apipassword123
checkid: 12345 checkid: 12345
state: paused state: paused
# Unpause the check with the ID of 12345. - name: Unpause the check with the ID of 12345
- pingdom: pingdom:
uid: example@example.com uid: example@example.com
passwd: password123 passwd: password123
key: apipassword123 key: apipassword123

View file

@ -57,7 +57,8 @@ options:
''' '''
EXAMPLES = ''' EXAMPLES = '''
- stackdriver: - name: Send a code deploy event to stackdriver
stackdriver:
key: AAAAAA key: AAAAAA
event: deploy event: deploy
deployed_to: production deployed_to: production
@ -65,7 +66,8 @@ EXAMPLES = '''
repository: MyWebApp repository: MyWebApp
revision_id: abcd123 revision_id: abcd123
- stackdriver: - name: Send an annotation event to stackdriver
stackdriver:
key: AAAAAA key: AAAAAA
event: annotation event: annotation
msg: Greetings from Ansible msg: Greetings from Ansible

View file

@ -35,14 +35,14 @@ notes:
''' '''
EXAMPLES = ''' EXAMPLES = '''
# Pause the monitor with an ID of 12345. - name: Pause the monitor with an ID of 12345
- uptimerobot: uptimerobot:
monitorid: 12345 monitorid: 12345
apikey: 12345-1234512345 apikey: 12345-1234512345
state: paused state: paused
# Start the monitor with an ID of 12345. - name: Start the monitor with an ID of 12345
- uptimerobot: uptimerobot:
monitorid: 12345 monitorid: 12345
apikey: 12345-1234512345 apikey: 12345-1234512345
state: started state: started

View file

@ -52,13 +52,15 @@ author: "Adam Garside (@fabulops)"
''' '''
EXAMPLES = ''' EXAMPLES = '''
- campfire: - name: Send a message to Campfire
campfire:
subscription: foo subscription: foo
token: 12345 token: 12345
room: 123 room: 123
msg: Task completed. msg: Task completed.
- campfire: - name: Send a message to Campfire
campfire:
subscription: foo subscription: foo
token: 12345 token: 12345
room: 123 room: 123

View file

@ -77,7 +77,8 @@ requirements: [ ]
''' '''
EXAMPLES = ''' EXAMPLES = '''
- flowdock: - name: Send a message to a flowdock
flowdock:
type: inbox type: inbox
token: AAAAAA token: AAAAAA
from_address: user@example.com from_address: user@example.com
@ -85,7 +86,8 @@ EXAMPLES = '''
msg: test from ansible msg: test from ansible
subject: test subject subject: test subject
- flowdock: - name: Send a message to a flowdock
flowdock:
type: chat type: chat
token: AAAAAA token: AAAAAA
external_user_name: testuser external_user_name: testuser

View file

@ -47,10 +47,11 @@ author: "Jonas Pfenniger (@zimbatm)"
''' '''
EXAMPLES = ''' EXAMPLES = '''
- grove: > - name: Sends a notification to a grove.io channel
channel_token=6Ph62VBBJOccmtTPZbubiPzdrhipZXtg grove:
service=my-app channel_token: 6Ph62VBBJOccmtTPZbubiPzdrhipZXtg
message=deployed {{ target }} service: my-app
message: 'deployed {{ target }}'
''' '''
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule

View file

@ -65,12 +65,13 @@ author:
''' '''
EXAMPLES = ''' EXAMPLES = '''
- hipchat: - name: Send a message to a Hipchat room
hipchat:
room: notif room: notif
msg: Ansible task finished msg: Ansible task finished
# Use Hipchat API version 2 - name: Send a message to a Hipchat room using Hipchat API version 2
- hipchat: hipchat:
api: https://api.hipchat.com/v2/ api: https://api.hipchat.com/v2/
token: OAUTH2_TOKEN token: OAUTH2_TOKEN
room: notify room: notify

View file

@ -83,12 +83,14 @@ author:
''' '''
EXAMPLES = ''' EXAMPLES = '''
- irc: - name: Send a message to an IRC channel from nick ansible
irc:
server: irc.example.net server: irc.example.net
channel: #t1 channel: #t1
msg: Hello world msg: Hello world
- local_action: - name: Send a message to an IRC channel
local_action:
module: irc module: irc
port: 6669 port: 6669
server: irc.example.net server: irc.example.net
@ -97,7 +99,8 @@ EXAMPLES = '''
color: red color: red
nick: ansibleIRC nick: ansibleIRC
- local_action: - name: Send a message to an IRC channel
local_action:
module: irc module: irc
port: 6669 port: 6669
server: irc.example.net server: irc.example.net

View file

@ -49,22 +49,22 @@ author: "Brian Coca (@bcoca)"
''' '''
EXAMPLES = ''' EXAMPLES = '''
# send a message to a user - name: Send a message to a user
- jabber: jabber:
user: mybot@example.net user: mybot@example.net
password: secret password: secret
to: friend@example.net to: friend@example.net
msg: Ansible task finished msg: Ansible task finished
# send a message to a room - name: Send a message to a room
- jabber: jabber:
user: mybot@example.net user: mybot@example.net
password: secret password: secret
to: mychaps@conference.example.net/ansiblebot to: mychaps@conference.example.net/ansiblebot
msg: Ansible task finished msg: Ansible task finished
# send a message, specifying the host and port - name: Send a message, specifying the host and port
- jabber: jabber:
user: mybot@example.net user: mybot@example.net
host: talk.example.net host: talk.example.net
port: 5223 port: 5223

View file

@ -39,7 +39,8 @@ author: "Jimmy Tang (@jcftang) <jimmy_tang@rapid7.com>"
RETURN = '''# ''' RETURN = '''# '''
EXAMPLES = ''' EXAMPLES = '''
- logentries_msg: - name: Send a message to logentries
logentries_msg:
token=00000000-0000-0000-0000-000000000000 token=00000000-0000-0000-0000-000000000000
msg="{{ ansible_hostname }}" msg="{{ ansible_hostname }}"
''' '''

View file

@ -95,7 +95,8 @@ author: "Jan-Piet Mens (@jpmens)"
''' '''
EXAMPLES = ''' EXAMPLES = '''
- mqtt: - name: Publish a message on an MQTT topic
mqtt:
topic: 'service/ansible/{{ ansible_hostname }}' topic: 'service/ansible/{{ ansible_hostname }}'
payload: 'Hello at {{ ansible_date_time.iso8601 }}' payload: 'Hello at {{ ansible_date_time.iso8601 }}'
qos: 0 qos: 0

View file

@ -50,28 +50,28 @@ notes:
''' '''
EXAMPLES = ''' EXAMPLES = '''
# Sends a push notification to a device - name: Sends a push notification to a device
- pushbullet: pushbullet:
api_key: "ABC123abc123ABC123abc123ABC123ab" api_key: "ABC123abc123ABC123abc123ABC123ab"
device: "Chrome" device: "Chrome"
title: "You may see this on Google Chrome" title: "You may see this on Google Chrome"
# Sends a link to a device - name: Sends a link to a device
- pushbullet: pushbullet:
api_key: ABC123abc123ABC123abc123ABC123ab api_key: ABC123abc123ABC123abc123ABC123ab
device: Chrome device: Chrome
push_type: link push_type: link
title: Ansible Documentation title: Ansible Documentation
body: https://docs.ansible.com/ body: https://docs.ansible.com/
# Sends a push notification to a channel - name: Sends a push notification to a channel
- pushbullet: pushbullet:
api_key: ABC123abc123ABC123abc123ABC123ab api_key: ABC123abc123ABC123abc123ABC123ab
channel: my-awesome-channel channel: my-awesome-channel
title: Broadcasting a message to the #my-awesome-channel folks title: Broadcasting a message to the #my-awesome-channel folks
# Sends a push notification with title and body to a channel - name: Sends a push notification with title and body to a channel
- pushbullet: pushbullet:
api_key: ABC123abc123ABC123abc123ABC123ab api_key: ABC123abc123ABC123abc123ABC123ab
channel: my-awesome-channel channel: my-awesome-channel
title: ALERT! Signup service is down title: ALERT! Signup service is down

View file

@ -43,13 +43,15 @@ author: "Jim Richardson (@weaselkeeper)"
''' '''
EXAMPLES = ''' EXAMPLES = '''
- pushover: - name: Send notifications via pushover.net
pushover:
msg: '{{ inventory_hostname }} is acting strange ...' msg: '{{ inventory_hostname }} is acting strange ...'
app_token: wxfdksl app_token: wxfdksl
user_key: baa5fe97f2c5ab3ca8f0bb59 user_key: baa5fe97f2c5ab3ca8f0bb59
delegate_to: localhost delegate_to: localhost
- pushover: - name: Send notifications via pushover.net
pushover:
title: 'Alert!' title: 'Alert!'
msg: '{{ inventory_hostname }} has exploded in flames, It is now time to panic' msg: '{{ inventory_hostname }} has exploded in flames, It is now time to panic'
pri: 1 pri: 1

View file

@ -34,7 +34,8 @@ author:
''' '''
EXAMPLES = ''' EXAMPLES = '''
- say: - name: Makes a computer to speak
say:
msg: '{{ inventory_hostname }} is all done' msg: '{{ inventory_hostname }} is all done'
voice: Zarvox voice: Zarvox
delegate_to: localhost delegate_to: localhost

View file

@ -74,8 +74,8 @@ author: "Matt Makai (@makaimc)"
''' '''
EXAMPLES = ''' EXAMPLES = '''
# send an email to a single recipient that the deployment was successful - name: Send an email to a single recipient that the deployment was successful
- sendgrid: sendgrid:
username: "{{ sendgrid_username }}" username: "{{ sendgrid_username }}"
password: "{{ sendgrid_password }}" password: "{{ sendgrid_password }}"
from_address: "ansible@mycompany.com" from_address: "ansible@mycompany.com"
@ -85,8 +85,8 @@ EXAMPLES = '''
body: "The most recent Ansible deployment was successful." body: "The most recent Ansible deployment was successful."
delegate_to: localhost delegate_to: localhost
# send an email to more than one recipient that the build failed - name: Send an email to more than one recipient that the build failed
- sendgrid: sendgrid:
username: "{{ sendgrid_username }}" username: "{{ sendgrid_username }}"
password: "{{ sendgrid_password }}" password: "{{ sendgrid_password }}"
from_address: "build@mycompany.com" from_address: "build@mycompany.com"

View file

@ -55,7 +55,8 @@ EXAMPLES = '''
# send an SMS about the build status to (555) 303 5681 # send an SMS about the build status to (555) 303 5681
# note: replace account_sid and auth_token values with your credentials # note: replace account_sid and auth_token values with your credentials
# and you have to have the 'from_number' on your Twilio account # and you have to have the 'from_number' on your Twilio account
- twilio: - name: Send a text message to a mobile phone through Twilio
twilio:
msg: All servers with webserver role are now configured. msg: All servers with webserver role are now configured.
account_sid: ACXXXXXXXXXXXXXXXXX account_sid: ACXXXXXXXXXXXXXXXXX
auth_token: ACXXXXXXXXXXXXXXXXX auth_token: ACXXXXXXXXXXXXXXXXX
@ -66,7 +67,8 @@ EXAMPLES = '''
# send an SMS to multiple phone numbers about the deployment # send an SMS to multiple phone numbers about the deployment
# note: replace account_sid and auth_token values with your credentials # note: replace account_sid and auth_token values with your credentials
# and you have to have the 'from_number' on your Twilio account # and you have to have the 'from_number' on your Twilio account
- twilio: - name: Send a text message to a mobile phone through Twilio
twilio:
msg: This server configuration is now complete. msg: This server configuration is now complete.
account_sid: ACXXXXXXXXXXXXXXXXX account_sid: ACXXXXXXXXXXXXXXXXX
auth_token: ACXXXXXXXXXXXXXXXXX auth_token: ACXXXXXXXXXXXXXXXXX
@ -81,7 +83,8 @@ EXAMPLES = '''
# and an image of the results # and an image of the results
# note: replace account_sid and auth_token values with your credentials # note: replace account_sid and auth_token values with your credentials
# and you have to have the 'from_number' on your Twilio account # and you have to have the 'from_number' on your Twilio account
- twilio: - name: Send a text message to a mobile phone through Twilio
twilio:
msg: Deployment complete! msg: Deployment complete!
account_sid: ACXXXXXXXXXXXXXXXXX account_sid: ACXXXXXXXXXXXXXXXXX
auth_token: ACXXXXXXXXXXXXXXXXX auth_token: ACXXXXXXXXXXXXXXXXX

View file

@ -36,7 +36,8 @@ author: "Takashi Someda (@tksmd)"
''' '''
EXAMPLES = ''' EXAMPLES = '''
- typetalk: - name: Send a message to typetalk
typetalk:
client_id: 12345 client_id: 12345
client_secret: 12345 client_secret: 12345
topic: 1 topic: 1

View file

@ -83,28 +83,28 @@ author: "Tim Hoiberg (@thoiberg)"
''' '''
EXAMPLES = ''' EXAMPLES = '''
# Installs gems from a Gemfile in the current directory - name: Install gems from a Gemfile in the current directory
- bundler: bundler:
state: present state: present
executable: ~/.rvm/gems/2.1.5/bin/bundle executable: ~/.rvm/gems/2.1.5/bin/bundle
# Excludes the production group from installing - name: Exclude the production group from installing
- bundler: bundler:
state: present state: present
exclude_groups: production exclude_groups: production
# Install gems into ./vendor/bundle - name: Install gems into ./vendor/bundle
- bundler: bundler:
state: present state: present
deployment_mode: yes deployment_mode: yes
# Installs gems using a Gemfile in another directory - name: Install gems using a Gemfile in another directory
- bundler: bundler:
state: present state: present
gemfile: ../rails_project/Gemfile gemfile: ../rails_project/Gemfile
# Updates Gemfile in another directory - name: Update Gemfile in another directory
- bundler: bundler:
state: latest state: latest
chdir: ~/rails_project chdir: ~/rails_project
''' '''

View file

@ -111,25 +111,26 @@ notes:
''' '''
EXAMPLES = ''' EXAMPLES = '''
# Downloads and installs all the libs and dependencies outlined in the /path/to/project/composer.lock - name: Download and installs all libs and dependencies outlined in the /path/to/project/composer.lock
- composer: composer:
command: install command: install
working_dir: /path/to/project working_dir: /path/to/project
- composer: - name: install a new package
composer:
command: require command: require
arguments: my/package arguments: my/package
working_dir: /path/to/project working_dir: /path/to/project
# Clone project and install with all dependencies - name: Clone and install a project with all dependencies
- composer: composer:
command: create-project command: create-project
arguments: package/package /path/to/project ~1.0 arguments: package/package /path/to/project ~1.0
working_dir: /path/to/project working_dir: /path/to/project
prefer_dist: yes prefer_dist: yes
# Installs package globally - name: Install a package globally
- composer: composer:
command: require command: require
global_command: yes global_command: yes
arguments: my/package arguments: my/package

View file

@ -66,42 +66,41 @@ author: "Franck Cuny (@fcuny)"
''' '''
EXAMPLES = ''' EXAMPLES = '''
# install Dancer perl package - name: Install Dancer perl package
- cpanm: cpanm:
name: Dancer name: Dancer
# install version 0.99_05 of the Plack perl package - name: Install version 0.99_05 of the Plack perl package
- cpanm: cpanm:
name: MIYAGAWA/Plack-0.99_05.tar.gz name: MIYAGAWA/Plack-0.99_05.tar.gz
# install Dancer into the specified locallib - name: Install Dancer into the specified locallib
- cpanm: cpanm:
name: Dancer name: Dancer
locallib: /srv/webapps/my_app/extlib locallib: /srv/webapps/my_app/extlib
# install perl dependencies from local directory - name: Install perl dependencies from local directory
- cpanm: cpanm:
from_path: /srv/webapps/my_app/src/ from_path: /srv/webapps/my_app/src/
# install Dancer perl package without running the unit tests in indicated locallib - name: Install Dancer perl package without running the unit tests in indicated locallib
- cpanm: cpanm:
name: Dancer name: Dancer
notest: True notest: True
locallib: /srv/webapps/my_app/extlib locallib: /srv/webapps/my_app/extlib
# install Dancer perl package from a specific mirror - name: Install Dancer perl package from a specific mirror
- cpanm: cpanm:
name: Dancer name: Dancer
mirror: 'http://cpan.cpantesters.org/' mirror: 'http://cpan.cpantesters.org/'
# install Dancer perl package into the system root path - name: Install Dancer perl package into the system root path
- cpanm: cpanm:
name: Dancer name: Dancer
system_lib: yes system_lib: yes
# install Dancer if it's not already installed - name: Install Dancer if it is not already installed OR the installed version is older than version 1.0
# OR the installed version is older than version 1.0 cpanm:
- cpanm:
name: Dancer name: Dancer
version: '1.0' version: '1.0'
''' '''

View file

@ -61,13 +61,13 @@ author: "Matt Wright (@mattupstate)"
''' '''
EXAMPLES = ''' EXAMPLES = '''
# Examples from Ansible Playbooks - name: Install or update pip
- easy_install: easy_install:
name: pip name: pip
state: latest state: latest
# Install Bottle into the specified virtualenv. - name: Install Bottle into the specified virtualenv
- easy_install: easy_install:
name: bottle name: bottle
virtualenv: /webapps/myapp/venv virtualenv: /webapps/myapp/venv
''' '''

View file

@ -94,19 +94,19 @@ author:
''' '''
EXAMPLES = ''' EXAMPLES = '''
# Installs version 1.0 of vagrant. - name: Install version 1.0 of vagrant
- gem: gem:
name: vagrant name: vagrant
version: 1.0 version: 1.0
state: present state: present
# Installs latest available version of rake. - name: Install latest available version of rake
- gem: gem:
name: rake name: rake
state: latest state: latest
# Installs rake version 1.0 from a local gem on disk. - name: Install rake version 1.0 from a local gem on disk
- gem: gem:
name: rake name: rake
gem_source: /path/to/gems/rake-1.0.gem gem_source: /path/to/gems/rake-1.0.gem
state: present state: present

View file

@ -119,21 +119,21 @@ extends_documentation_fragment:
''' '''
EXAMPLES = ''' EXAMPLES = '''
# Download the latest version of the JUnit framework artifact from Maven Central - name: Download the latest version of the JUnit framework artifact from Maven Central
- maven_artifact: maven_artifact:
group_id: junit group_id: junit
artifact_id: junit artifact_id: junit
dest: /tmp/junit-latest.jar dest: /tmp/junit-latest.jar
# Download JUnit 4.11 from Maven Central - name: Download JUnit 4.11 from Maven Central
- maven_artifact: maven_artifact:
group_id: junit group_id: junit
artifact_id: junit artifact_id: junit
version: 4.11 version: 4.11
dest: /tmp/junit-4.11.jar dest: /tmp/junit-4.11.jar
# Download an artifact from a private repository requiring authentication - name: Download an artifact from a private repository requiring authentication
- maven_artifact: maven_artifact:
group_id: com.company group_id: com.company
artifact_id: library-name artifact_id: library-name
repository_url: 'https://repo.company.com/maven' repository_url: 'https://repo.company.com/maven'
@ -141,31 +141,31 @@ EXAMPLES = '''
password: pass password: pass
dest: /tmp/library-name-latest.jar dest: /tmp/library-name-latest.jar
# Download a WAR File to the Tomcat webapps directory to be deployed - name: Download a WAR File to the Tomcat webapps directory to be deployed
- maven_artifact: maven_artifact:
group_id: com.company group_id: com.company
artifact_id: web-app artifact_id: web-app
extension: war extension: war
repository_url: 'https://repo.company.com/maven' repository_url: 'https://repo.company.com/maven'
dest: /var/lib/tomcat7/webapps/web-app.war dest: /var/lib/tomcat7/webapps/web-app.war
# Keep a downloaded artifact's name, i.e. retain the version - name: Keep a downloaded artifact's name, i.e. retain the version
- maven_artifact: maven_artifact:
version: latest version: latest
artifact_id: spring-core artifact_id: spring-core
group_id: org.springframework group_id: org.springframework
dest: /tmp/ dest: /tmp/
keep_name: yes keep_name: yes
# Download the latest version of the JUnit framework artifact from Maven local - name: Download the latest version of the JUnit framework artifact from Maven local
- maven_artifact: maven_artifact:
group_id: junit group_id: junit
artifact_id: junit artifact_id: junit
dest: /tmp/junit-latest.jar dest: /tmp/junit-latest.jar
repository_url: "file://{{ lookup('env','HOME') }}/.m2/repository" repository_url: "file://{{ lookup('env','HOME') }}/.m2/repository"
# Download the latest version between 3.8 and 4.0 (exclusive) of the JUnit framework artifact from Maven Central - name: Download the latest version between 3.8 and 4.0 (exclusive) of the JUnit framework artifact from Maven Central
- maven_artifact: maven_artifact:
group_id: junit group_id: junit
artifact_id: junit artifact_id: junit
version_by_spec: "[3.8,4.0)" version_by_spec: "[3.8,4.0)"

View file

@ -36,23 +36,23 @@ options:
''' '''
EXAMPLES = ''' EXAMPLES = '''
# Install pear package - name: Install pear package
- pear: pear:
name: Net_URL2 name: Net_URL2
state: present state: present
# Install pecl package - name: Install pecl package
- pear: pear:
name: pecl/json_post name: pecl/json_post
state: present state: present
# Upgrade package - name: Upgrade package
- pear: pear:
name: Net_URL2 name: Net_URL2
state: latest state: latest
# Remove packages - name: Remove packages
- pear: pear:
name: Net_URL2,pecl/json_post name: Net_URL2,pecl/json_post
state: absent state: absent
''' '''