diff --git a/plugins/modules/cloud/packet/packet_volume.py b/plugins/modules/cloud/packet/packet_volume.py index 80f7d81178..aeb4d28ae5 100644 --- a/plugins/modules/cloud/packet/packet_volume.py +++ b/plugins/modules/cloud/packet/packet_volume.py @@ -126,7 +126,7 @@ EXAMPLES = ''' project_id: 53000fb2-ee46-4673-93a8-de2c2bdba33b tasks: - - name: test create volume + - name: Create volume packet_volume: description: "{{ volname }}" project_id: "{{ project_id }}" @@ -139,7 +139,7 @@ EXAMPLES = ''' snapshot_frequency: 1day register: result_create - - name: test delete volume + - name: Delete volume packet_volume: id: "{{ result_create.id }}" project_id: "{{ project_id }}" diff --git a/plugins/modules/cloud/packet/packet_volume_attachment.py b/plugins/modules/cloud/packet/packet_volume_attachment.py index 669635832a..1143c83e41 100644 --- a/plugins/modules/cloud/packet/packet_volume_attachment.py +++ b/plugins/modules/cloud/packet/packet_volume_attachment.py @@ -77,7 +77,7 @@ EXAMPLES = ''' project_id: 52000fb2-ee46-4673-93a8-de2c2bdba33b tasks: - - name: test create volume + - name: Create volume packet_volume: description: "{{ volname }}" project_id: "{{ project_id }}" @@ -89,7 +89,8 @@ EXAMPLES = ''' snapshot_count: 10 snapshot_frequency: 1day - - packet_device: + - name: Create a device + packet_device: project_id: "{{ project_id }}" hostnames: "{{ devname }}" operating_system: ubuntu_16_04 @@ -109,7 +110,6 @@ EXAMPLES = ''' volume: "{{ volname }}" device: "{{ devname }}" state: absent - ''' RETURN = ''' diff --git a/plugins/modules/cloud/profitbricks/profitbricks.py b/plugins/modules/cloud/profitbricks/profitbricks.py index 33e92fa349..090fe233a7 100644 --- a/plugins/modules/cloud/profitbricks/profitbricks.py +++ b/plugins/modules/cloud/profitbricks/profitbricks.py @@ -115,9 +115,9 @@ EXAMPLES = ''' # 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. - -- profitbricks: +# Provisioning example +- name: Create three servers and enumerate their names + profitbricks: datacenter: Tardis One name: web%02d.stackpointcloud.com cores: 4 @@ -129,9 +129,8 @@ EXAMPLES = ''' count: 3 assign_public_ip: true -# Removing Virtual machines - -- profitbricks: +- name: Remove virtual machines + profitbricks: datacenter: Tardis One instance_ids: - 'web001.stackpointcloud.com' @@ -140,9 +139,8 @@ EXAMPLES = ''' wait_timeout: 500 state: absent -# Starting Virtual Machines. - -- profitbricks: +- name: Start virtual machines + profitbricks: datacenter: Tardis One instance_ids: - 'web001.stackpointcloud.com' @@ -151,9 +149,8 @@ EXAMPLES = ''' wait_timeout: 500 state: running -# Stopping Virtual Machines - -- profitbricks: +- name: Stop virtual machines + profitbricks: datacenter: Tardis One instance_ids: - 'web001.stackpointcloud.com' @@ -161,7 +158,6 @@ EXAMPLES = ''' - 'web003.stackpointcloud.com' wait_timeout: 500 state: stopped - ''' import re diff --git a/plugins/modules/cloud/profitbricks/profitbricks_datacenter.py b/plugins/modules/cloud/profitbricks/profitbricks_datacenter.py index 03b23c6da6..cc8ae6efec 100644 --- a/plugins/modules/cloud/profitbricks/profitbricks_datacenter.py +++ b/plugins/modules/cloud/profitbricks/profitbricks_datacenter.py @@ -58,18 +58,16 @@ author: Matt Baldwin (@baldwinSPC) ''' EXAMPLES = ''' - -# Create a Datacenter -- profitbricks_datacenter: +- name: Create a datacenter + profitbricks_datacenter: datacenter: Tardis One wait_timeout: 500 -# Destroy a Datacenter. This will remove all servers, volumes, and other objects in the datacenter. -- profitbricks_datacenter: +- name: Destroy a datacenter (remove all servers, volumes, and other objects in the datacenter) + profitbricks_datacenter: datacenter: Tardis One wait_timeout: 500 state: absent - ''' import re diff --git a/plugins/modules/cloud/profitbricks/profitbricks_nic.py b/plugins/modules/cloud/profitbricks/profitbricks_nic.py index 76b5003e70..205730fa14 100644 --- a/plugins/modules/cloud/profitbricks/profitbricks_nic.py +++ b/plugins/modules/cloud/profitbricks/profitbricks_nic.py @@ -59,23 +59,21 @@ author: Matt Baldwin (@baldwinSPC) ''' EXAMPLES = ''' - -# Create a NIC -- profitbricks_nic: +- name: Create a NIC + profitbricks_nic: datacenter: Tardis One server: node002 lan: 2 wait_timeout: 500 state: present -# Remove a NIC -- profitbricks_nic: +- name: Remove a NIC + profitbricks_nic: datacenter: Tardis One server: node002 name: 7341c2454f wait_timeout: 500 state: absent - ''' import re diff --git a/plugins/modules/cloud/profitbricks/profitbricks_volume.py b/plugins/modules/cloud/profitbricks/profitbricks_volume.py index ce328b5309..fb5bb4df99 100644 --- a/plugins/modules/cloud/profitbricks/profitbricks_volume.py +++ b/plugins/modules/cloud/profitbricks/profitbricks_volume.py @@ -100,10 +100,8 @@ author: Matt Baldwin (@baldwinSPC) ''' EXAMPLES = ''' - -# Create Multiple Volumes - -- profitbricks_volume: +- name: Create multiple volumes + profitbricks_volume: datacenter: Tardis One name: vol%02d count: 5 @@ -111,16 +109,14 @@ EXAMPLES = ''' wait_timeout: 500 state: present -# Remove Volumes - -- profitbricks_volume: +- name: Remove Volumes + profitbricks_volume: datacenter: Tardis One instance_ids: - 'vol01' - 'vol02' wait_timeout: 500 state: absent - ''' import re diff --git a/plugins/modules/cloud/profitbricks/profitbricks_volume_attachments.py b/plugins/modules/cloud/profitbricks/profitbricks_volume_attachments.py index 1fd11edfdd..8c851142ba 100644 --- a/plugins/modules/cloud/profitbricks/profitbricks_volume_attachments.py +++ b/plugins/modules/cloud/profitbricks/profitbricks_volume_attachments.py @@ -55,25 +55,21 @@ author: Matt Baldwin (@baldwinSPC) ''' EXAMPLES = ''' - -# Attach a Volume - -- profitbricks_volume_attachments: +- name: Attach a volume + profitbricks_volume_attachments: datacenter: Tardis One server: node002 volume: vol01 wait_timeout: 500 state: present -# Detach a Volume - -- profitbricks_volume_attachments: +- name: Detach a volume + profitbricks_volume_attachments: datacenter: Tardis One server: node002 volume: vol01 wait_timeout: 500 state: absent - ''' import re diff --git a/plugins/modules/cloud/rackspace/rax_clb_nodes.py b/plugins/modules/cloud/rackspace/rax_clb_nodes.py index 618e0a305a..9bf7bf4cde 100644 --- a/plugins/modules/cloud/rackspace/rax_clb_nodes.py +++ b/plugins/modules/cloud/rackspace/rax_clb_nodes.py @@ -76,8 +76,8 @@ extends_documentation_fragment: ''' EXAMPLES = ''' -# Add a new node to the load balancer -- local_action: +- name: Add a new node to the load balancer + local_action: module: rax_clb_nodes load_balancer_id: 71 address: 10.2.2.3 @@ -87,8 +87,8 @@ EXAMPLES = ''' wait: yes credentials: /path/to/credentials -# Drain connections from a node -- local_action: +- name: Drain connections from a node + local_action: module: rax_clb_nodes load_balancer_id: 71 node_id: 410 @@ -96,8 +96,8 @@ EXAMPLES = ''' wait: yes credentials: /path/to/credentials -# Remove a node from the load balancer -- local_action: +- name: Remove a node from the load balancer + local_action: module: rax_clb_nodes load_balancer_id: 71 node_id: 410 diff --git a/plugins/modules/cloud/scaleway/scaleway_ip.py b/plugins/modules/cloud/scaleway/scaleway_ip.py index bdd15215b7..79d535977b 100644 --- a/plugins/modules/cloud/scaleway/scaleway_ip.py +++ b/plugins/modules/cloud/scaleway/scaleway_ip.py @@ -59,19 +59,18 @@ options: ''' EXAMPLES = ''' - - name: Create an IP - scaleway_ip: - organization: '{{ scw_org }}' - state: present - region: par1 - register: ip_creation_task - - - name: Make sure IP deleted - scaleway_ip: - id: '{{ ip_creation_task.scaleway_ip.id }}' - state: absent - region: par1 +- name: Create an IP + scaleway_ip: + organization: '{{ scw_org }}' + state: present + region: par1 + register: ip_creation_task +- name: Make sure IP deleted + scaleway_ip: + id: '{{ ip_creation_task.scaleway_ip.id }}' + state: absent + region: par1 ''' RETURN = ''' diff --git a/plugins/modules/cloud/scaleway/scaleway_security_group.py b/plugins/modules/cloud/scaleway/scaleway_security_group.py index 1b877448ac..56eab53dbf 100644 --- a/plugins/modules/cloud/scaleway/scaleway_security_group.py +++ b/plugins/modules/cloud/scaleway/scaleway_security_group.py @@ -83,18 +83,18 @@ options: ''' EXAMPLES = ''' - - name: Create a Security Group - scaleway_security_group: - state: present - region: par1 - name: security_group - description: "my security group description" - organization: "43a3b6c8-916f-477b-b7ec-ff1898f5fdd9" - stateful: false - inbound_default_policy: accept - outbound_default_policy: accept - organization_default: false - register: security_group_creation_task +- name: Create a Security Group + scaleway_security_group: + state: present + region: par1 + name: security_group + description: "my security group description" + organization: "43a3b6c8-916f-477b-b7ec-ff1898f5fdd9" + stateful: false + inbound_default_policy: accept + outbound_default_policy: accept + organization_default: false + register: security_group_creation_task ''' RETURN = ''' diff --git a/plugins/modules/cloud/scaleway/scaleway_volume.py b/plugins/modules/cloud/scaleway/scaleway_volume.py index 4d0ebc7eaa..857088b641 100644 --- a/plugins/modules/cloud/scaleway/scaleway_volume.py +++ b/plugins/modules/cloud/scaleway/scaleway_volume.py @@ -55,22 +55,21 @@ options: ''' EXAMPLES = ''' - - name: Create 10GB volume - scaleway_volume: - name: my-volume - state: present - region: par1 - organization: "{{ scw_org }}" - "size": 10000000000 - volume_type: l_ssd - register: server_creation_check_task - - - name: Make sure volume deleted - scaleway_volume: - name: my-volume - state: absent - region: par1 +- name: Create 10GB volume + scaleway_volume: + name: my-volume + state: present + region: par1 + organization: "{{ scw_org }}" + "size": 10000000000 + volume_type: l_ssd + register: server_creation_check_task +- name: Make sure volume deleted + scaleway_volume: + name: my-volume + state: absent + region: par1 ''' RETURN = ''' diff --git a/plugins/modules/cloud/smartos/smartos_image_info.py b/plugins/modules/cloud/smartos/smartos_image_info.py index f88f586981..a235c12488 100644 --- a/plugins/modules/cloud/smartos/smartos_image_info.py +++ b/plugins/modules/cloud/smartos/smartos_image_info.py @@ -27,27 +27,32 @@ options: ''' EXAMPLES = ''' -# Return information about all installed images. -- smartos_image_info: +- name: Return information about all installed images + smartos_image_info: register: result -# Return all private active Linux images. -- smartos_image_info: filters="os=linux state=active public=false" +- name: Return all private active Linux images + smartos_image_info: + filters: "os=linux state=active public=false" register: result -# Show, how many clones does every image have. -- smartos_image_info: +- name: Show, how many clones does every image have + smartos_image_info: register: result -- debug: msg="{{ result.smartos_images[item]['name'] }}-{{ result.smartos_images[item]['version'] }} - has {{ result.smartos_images[item]['clones'] }} VM(s)" +- name: Print information + 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 }}" # When the module is called as smartos_image_facts, return values are published # in ansible_facts['smartos_images'] and can be used as follows. # Note that this is deprecated and will stop working in Ansible 2.13. -- debug: msg="{{ smartos_images[item]['name'] }}-{{ smartos_images[item]['version'] }} - has {{ smartos_images[item]['clones'] }} VM(s)" +- name: Print information + debug: + msg: "{{ smartos_images[item]['name'] }}-{{ smartos_images[item]['version'] }} + has {{ smartos_images[item]['clones'] }} VM(s)" with_items: "{{ smartos_images.keys() | list }}" ''' diff --git a/plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py b/plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py index 2d886550e6..2cdedeefb5 100644 --- a/plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py +++ b/plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py @@ -466,7 +466,7 @@ EXAMPLES = ''' - hosts: localhost tasks: - - name: create elastigroup + - name: Create elastigroup spotinst_aws_elastigroup: state: present risk: 100 @@ -500,7 +500,7 @@ EXAMPLES = ''' - hosts: localhost tasks: - - name: create elastigroup + - name: Create elastigroup spotinst_aws_elastigroup: state: present account_id: act-1a9dd2b @@ -547,7 +547,7 @@ EXAMPLES = ''' - hosts: localhost tasks: - - name: create elastigroup + - name: Create elastigroup spotinst_aws_elastigroup: state: present account_id: act-1a9dd2b @@ -597,7 +597,7 @@ EXAMPLES = ''' - hosts: localhost tasks: - - name: create elastigroup + - name: Create elastigroup spotinst_aws_elastigroup: state: present risk: 100 @@ -637,7 +637,7 @@ EXAMPLES = ''' - hosts: localhost tasks: - - name: create elastigroup + - name: Create elastigroup spotinst_aws_elastigroup: state: present risk: 100 @@ -675,7 +675,7 @@ EXAMPLES = ''' - hosts: localhost tasks: - - name: create elastigroup + - name: Create elastigroup spotinst_aws_elastigroup: account_id: act-92d45673 state: present @@ -714,8 +714,8 @@ EXAMPLES = ''' - image_id register: result - debug: var=result - ''' + RETURN = ''' --- instances: diff --git a/plugins/modules/cloud/univention/udm_dns_record.py b/plugins/modules/cloud/univention/udm_dns_record.py index c96d7e5281..238d50d224 100644 --- a/plugins/modules/cloud/univention/udm_dns_record.py +++ b/plugins/modules/cloud/univention/udm_dns_record.py @@ -54,8 +54,8 @@ options: EXAMPLES = ''' -# Create a DNS record on a UCS -- udm_dns_record: +- name: Create a DNS record on a UCS + udm_dns_record: name: www zone: example.com type: host_record @@ -66,7 +66,7 @@ EXAMPLES = ''' ''' -RETURN = '''# ''' +RETURN = '''#''' HAVE_UNIVENTION = False try: diff --git a/plugins/modules/cloud/univention/udm_dns_zone.py b/plugins/modules/cloud/univention/udm_dns_zone.py index 55c421af6c..e290d27c64 100644 --- a/plugins/modules/cloud/univention/udm_dns_zone.py +++ b/plugins/modules/cloud/univention/udm_dns_zone.py @@ -81,8 +81,8 @@ options: EXAMPLES = ''' -# Create a DNS zone on a UCS -- udm_dns_zone: +- name: Create a DNS zone on a UCS + udm_dns_zone: zone: example.com type: forward_zone nameserver: diff --git a/plugins/modules/cloud/univention/udm_group.py b/plugins/modules/cloud/univention/udm_group.py index e3874217e4..349ab56ce3 100644 --- a/plugins/modules/cloud/univention/udm_group.py +++ b/plugins/modules/cloud/univention/udm_group.py @@ -52,18 +52,21 @@ options: EXAMPLES = ''' -# Create a POSIX group -- udm_group: +- name: Create a POSIX group + udm_group: name: g123m-1A # 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) -- udm_group: +- name: Create a POSIX group with a DN + udm_group: name: g123m-1A subpath: 'cn=classes,cn=students,cn=groups' ou: school + # or -- udm_group: +- name: Create a POSIX group with a DN + udm_group: name: g123m-1A position: 'cn=classes,cn=students,cn=groups,ou=school,dc=school,dc=example,dc=com' ''' diff --git a/plugins/modules/cloud/univention/udm_share.py b/plugins/modules/cloud/univention/udm_share.py index ec24cd6259..166fa59f9f 100644 --- a/plugins/modules/cloud/univention/udm_share.py +++ b/plugins/modules/cloud/univention/udm_share.py @@ -292,8 +292,8 @@ options: EXAMPLES = ''' -# Create a share named home on the server ucs.example.com with the path /home. -- udm_share: +- name: Create a share named home on the server ucs.example.com with the path /home + udm_share: name: home path: /home host: ucs.example.com diff --git a/plugins/modules/cloud/univention/udm_user.py b/plugins/modules/cloud/univention/udm_user.py index 715cf57483..1c2b58b920 100644 --- a/plugins/modules/cloud/univention/udm_user.py +++ b/plugins/modules/cloud/univention/udm_user.py @@ -227,24 +227,25 @@ options: EXAMPLES = ''' -# Create a user on a UCS -- udm_user: +- name: Create a user on a UCS + udm_user: name: FooBar password: secure_password firstname: Foo lastname: Bar -# Create a user with the DN -# C(uid=foo,cn=teachers,cn=users,ou=school,dc=school,dc=example,dc=com) -- 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 password: secure_password firstname: Foo lastname: Bar ou: school subpath: 'cn=teachers,cn=users' + # 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 password: secure_password firstname: Foo diff --git a/plugins/modules/cloud/webfaction/webfaction_site.py b/plugins/modules/cloud/webfaction/webfaction_site.py index 7681775be7..3c73859caa 100644 --- a/plugins/modules/cloud/webfaction/webfaction_site.py +++ b/plugins/modules/cloud/webfaction/webfaction_site.py @@ -73,7 +73,7 @@ options: ''' EXAMPLES = ''' - - name: create website + - name: Create website webfaction_site: name: testsite1 state: present diff --git a/plugins/modules/clustering/znode.py b/plugins/modules/clustering/znode.py index 68716bb481..b9d63df66b 100644 --- a/plugins/modules/clustering/znode.py +++ b/plugins/modules/clustering/znode.py @@ -46,40 +46,40 @@ author: "Trey Perry (@treyperry)" ''' EXAMPLES = """ -# Creating or updating a znode with a given value -- znode: +- name: Creating or updating a znode with a given value + znode: hosts: 'localhost:2181' name: /mypath value: myvalue state: present -# Getting the value and stat structure for a znode -- znode: +- name: Getting the value and stat structure for a znode + znode: hosts: 'localhost:2181' name: /mypath op: get -# Listing a particular znode's children -- znode: +- name: Listing a particular znode's children + znode: hosts: 'localhost:2181' name: /zookeeper op: list -# Waiting 20 seconds for a znode to appear at path /mypath -- znode: +- name: Waiting 20 seconds for a znode to appear at path /mypath + znode: hosts: 'localhost:2181' name: /mypath op: wait timeout: 20 -# Deleting a znode at path /mypath -- znode: +- name: Deleting a znode at path /mypath + znode: hosts: 'localhost:2181' name: /mypath state: absent -# Creating or updating a znode with a given value on a remote Zookeeper -- znode: +- name: Creating or updating a znode with a given value on a remote Zookeeper + znode: hosts: 'my-zookeeper-node:2181' name: /mypath value: myvalue diff --git a/plugins/modules/identity/opendj/opendj_backendprop.py b/plugins/modules/identity/opendj/opendj_backendprop.py index fb810e8320..aa477e42d7 100644 --- a/plugins/modules/identity/opendj/opendj_backendprop.py +++ b/plugins/modules/identity/opendj/opendj_backendprop.py @@ -65,7 +65,7 @@ options: ''' EXAMPLES = ''' - - name: "Add or update OpenDJ backend properties" + - name: Add or update OpenDJ backend properties action: opendj_backendprop hostname=localhost port=4444 diff --git a/plugins/modules/monitoring/airbrake_deployment.py b/plugins/modules/monitoring/airbrake_deployment.py index 11c78f59a1..dd1af0fd6f 100644 --- a/plugins/modules/monitoring/airbrake_deployment.py +++ b/plugins/modules/monitoring/airbrake_deployment.py @@ -53,7 +53,8 @@ requirements: [] ''' EXAMPLES = ''' -- airbrake_deployment: +- name: Notify airbrake about an app deployment + airbrake_deployment: token: AAAAAA environment: staging user: ansible diff --git a/plugins/modules/monitoring/bigpanda.py b/plugins/modules/monitoring/bigpanda.py index da111ceaad..8ad186e3d7 100644 --- a/plugins/modules/monitoring/bigpanda.py +++ b/plugins/modules/monitoring/bigpanda.py @@ -74,20 +74,23 @@ requirements: [ ] ''' EXAMPLES = ''' -- bigpanda: +- name: Notify BigPanda about a deployment + bigpanda: component: myapp version: '1.3' token: '{{ bigpanda_token }}' state: started -- bigpanda: +- name: Notify BigPanda about a deployment + bigpanda: component: myapp version: '1.3' token: '{{ bigpanda_token }}' state: finished # 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 version: '1.3' token: '{{ bigpanda_token }}' @@ -96,7 +99,8 @@ EXAMPLES = ''' delegate_to: localhost register: deployment -- bigpanda: +- name: Notify BigPanda about a deployment + bigpanda: component: '{{ deployment.component }}' version: '{{ deployment.version }}' token: '{{ deployment.token }}' diff --git a/plugins/modules/monitoring/circonus_annotation.py b/plugins/modules/monitoring/circonus_annotation.py index 3702b7001c..c6319cbe43 100644 --- a/plugins/modules/monitoring/circonus_annotation.py +++ b/plugins/modules/monitoring/circonus_annotation.py @@ -50,21 +50,23 @@ options: default: 0 ''' EXAMPLES = ''' -# Create a simple annotation event with a source, defaults to start and end time of now -- circonus_annotation: +- name: Create a simple annotation event with a source, defaults to start and end time of now + circonus_annotation: api_key: XXXXXXXXXXXXXXXXX title: App Config Change description: This is a detailed description of the config change 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 title: App Config Change description: This is a detailed description of the config change category: This category groups like annotations 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 title: App Config Change description: This is a detailed description of the config change diff --git a/plugins/modules/monitoring/datadog/datadog_event.py b/plugins/modules/monitoring/datadog/datadog_event.py index e91cc2402c..387f68f340 100644 --- a/plugins/modules/monitoring/datadog/datadog_event.py +++ b/plugins/modules/monitoring/datadog/datadog_event.py @@ -64,15 +64,16 @@ options: ''' EXAMPLES = ''' -# Post an event with low priority -- datadog_event: +- name: Post an event with low priority + datadog_event: title: Testing from ansible text: Test priority: low api_key: 9775a026f1ca7d1c6c5af9d94d9595a4 app_key: j4JyCYfefWHhgFgiZUqRm63AXHNZQyPGBfJtAzmN -# Post an event with several tags -- datadog_event: + +- name: Post an event with several tags + datadog_event: title: Testing from ansible text: Test api_key: 9775a026f1ca7d1c6c5af9d94d9595a4 diff --git a/plugins/modules/monitoring/datadog/datadog_monitor.py b/plugins/modules/monitoring/datadog/datadog_monitor.py index 55e8d0dc39..e14081b307 100644 --- a/plugins/modules/monitoring/datadog/datadog_monitor.py +++ b/plugins/modules/monitoring/datadog/datadog_monitor.py @@ -137,8 +137,8 @@ options: ''' EXAMPLES = ''' -# Create a metric monitor -- datadog_monitor: +- name: Create a metric monitor + datadog_monitor: type: "metric alert" name: "Test monitor" state: "present" @@ -147,30 +147,30 @@ EXAMPLES = ''' api_key: "9775a026f1ca7d1c6c5af9d94d9595a4" app_key: "87ce4a24b5553d2e482ea8a8500e71b8ad4554ff" -# Deletes a monitor -- datadog_monitor: +- name: Deletes a monitor + datadog_monitor: name: "Test monitor" state: "absent" api_key: "9775a026f1ca7d1c6c5af9d94d9595a4" app_key: "87ce4a24b5553d2e482ea8a8500e71b8ad4554ff" -# Mutes a monitor -- datadog_monitor: +- name: Mutes a monitor + datadog_monitor: name: "Test monitor" state: "mute" silenced: '{"*":None}' api_key: "9775a026f1ca7d1c6c5af9d94d9595a4" app_key: "87ce4a24b5553d2e482ea8a8500e71b8ad4554ff" -# Unmutes a monitor -- datadog_monitor: +- name: Unmutes a monitor + datadog_monitor: name: "Test monitor" state: "unmute" api_key: "9775a026f1ca7d1c6c5af9d94d9595a4" app_key: "87ce4a24b5553d2e482ea8a8500e71b8ad4554ff" -# Use datadoghq.eu platform instead of datadoghq.com -- datadog_monitor: +- name: Use datadoghq.eu platform instead of datadoghq.com + datadog_monitor: name: "Test monitor" state: "absent" api_host: https://api.datadoghq.eu diff --git a/plugins/modules/monitoring/honeybadger_deployment.py b/plugins/modules/monitoring/honeybadger_deployment.py index d2cff20c71..3da1d133e7 100644 --- a/plugins/modules/monitoring/honeybadger_deployment.py +++ b/plugins/modules/monitoring/honeybadger_deployment.py @@ -46,7 +46,8 @@ options: ''' EXAMPLES = ''' -- honeybadger_deployment: +- name: Notify Honeybadger.io about an app deployment + honeybadger_deployment: token: AAAAAA environment: staging user: ansible diff --git a/plugins/modules/monitoring/librato_annotation.py b/plugins/modules/monitoring/librato_annotation.py index 48a5c87f7d..aae4b4268b 100644 --- a/plugins/modules/monitoring/librato_annotation.py +++ b/plugins/modules/monitoring/librato_annotation.py @@ -60,16 +60,16 @@ options: ''' EXAMPLES = ''' -# Create a simple annotation event with a source -- librato_annotation: +- name: Create a simple annotation event with a source + librato_annotation: user: user@example.com api_key: XXXXXXXXXXXXXXXXX title: App Config Change source: foo.bar description: This is a detailed description of the config change -# Create an annotation that includes a link -- librato_annotation: +- name: Create an annotation that includes a link + librato_annotation: user: user@example.com api_key: XXXXXXXXXXXXXXXXXX name: code.deploy @@ -79,8 +79,8 @@ EXAMPLES = ''' - rel: example href: http://www.example.com/deploy -# Create an annotation with a start_time and end_time -- librato_annotation: +- name: Create an annotation with a start_time and end_time + librato_annotation: user: user@example.com api_key: XXXXXXXXXXXXXXXXXX name: maintenance diff --git a/plugins/modules/monitoring/logentries.py b/plugins/modules/monitoring/logentries.py index 546c9f8e4b..12627780b1 100644 --- a/plugins/modules/monitoring/logentries.py +++ b/plugins/modules/monitoring/logentries.py @@ -39,14 +39,14 @@ notes: - Requires the LogEntries agent which can be installed following the instructions at logentries.com ''' EXAMPLES = ''' -# Track nginx logs -- logentries: +- name: Track nginx logs + logentries: path: /var/log/nginx/access.log state: present name: nginx-access-log -# Stop tracking nginx logs -- logentries: +- name: Stop tracking nginx logs + logentries: path: /var/log/nginx/error.log state: absent ''' diff --git a/plugins/modules/monitoring/monit.py b/plugins/modules/monitoring/monit.py index 22b3daee7d..13c0abc6b7 100644 --- a/plugins/modules/monitoring/monit.py +++ b/plugins/modules/monitoring/monit.py @@ -34,8 +34,8 @@ author: "Darryl Stoflet (@dstoflet)" ''' EXAMPLES = ''' -# Manage the state of program "httpd" to be in "started" state. -- monit: +- name: Manage the state of program httpd to be in started state + monit: name: httpd state: started ''' diff --git a/plugins/modules/monitoring/nagios.py b/plugins/modules/monitoring/nagios.py index 6e8fba3071..8fe1eac654 100644 --- a/plugins/modules/monitoring/nagios.py +++ b/plugins/modules/monitoring/nagios.py @@ -85,114 +85,114 @@ author: "Tim Bielawa (@tbielawa)" ''' EXAMPLES = ''' -# set 30 minutes of apache downtime -- nagios: +- name: Set 30 minutes of apache downtime + nagios: action: downtime minutes: 30 service: httpd host: '{{ inventory_hostname }}' -# schedule an hour of HOST downtime -- nagios: +- name: Schedule an hour of HOST downtime + nagios: action: downtime minutes: 60 service: host host: '{{ inventory_hostname }}' -# schedule an hour of HOST downtime starting at 2019-04-23T02:00:00+00:00 -- nagios: +- name: Schedule an hour of HOST downtime starting at 2019-04-23T02:00:00+00:00 + nagios: action: downtime start: 1555984800 minutes: 60 service: host host: '{{ inventory_hostname }}' -# schedule an hour of HOST downtime, with a comment describing the reason -- nagios: +- name: Schedule an hour of HOST downtime, with a comment describing the reason + nagios: action: downtime minutes: 60 service: host host: '{{ inventory_hostname }}' comment: Rebuilding machine -# schedule downtime for ALL services on HOST -- nagios: +- name: Schedule downtime for ALL services on HOST + nagios: action: downtime minutes: 45 service: all host: '{{ inventory_hostname }}' -# schedule downtime for a few services -- nagios: +- name: Schedule downtime for a few services + nagios: action: downtime services: frob,foobar,qeuz host: '{{ inventory_hostname }}' -# set 30 minutes downtime for all services in servicegroup foo -- nagios: +- name: Set 30 minutes downtime for all services in servicegroup foo + nagios: action: servicegroup_service_downtime minutes: 30 servicegroup: foo host: '{{ inventory_hostname }}' -# set 30 minutes downtime for all host in servicegroup foo -- nagios: +- name: Set 30 minutes downtime for all host in servicegroup foo + nagios: action: servicegroup_host_downtime minutes: 30 servicegroup: foo host: '{{ inventory_hostname }}' -# delete all downtime for a given host -- nagios: +- name: Delete all downtime for a given host + nagios: action: delete_downtime host: '{{ inventory_hostname }}' service: all -# delete all downtime for HOST with a particular comment -- nagios: +- name: Delete all downtime for HOST with a particular comment + nagios: action: delete_downtime host: '{{ inventory_hostname }}' service: host comment: Planned maintenance -# enable SMART disk alerts -- nagios: +- name: Enable SMART disk alerts + nagios: action: enable_alerts service: smart host: '{{ inventory_hostname }}' -# "two services at once: disable httpd and nfs alerts" -- nagios: +- name: Disable httpd and nfs alerts + nagios: action: disable_alerts service: httpd,nfs host: '{{ inventory_hostname }}' -# disable HOST alerts -- nagios: +- name: Disable HOST alerts + nagios: action: disable_alerts service: host host: '{{ inventory_hostname }}' -# silence ALL alerts -- nagios: +- name: Silence ALL alerts + nagios: action: silence host: '{{ inventory_hostname }}' -# unsilence all alerts -- nagios: +- name: Unsilence all alerts + nagios: action: unsilence host: '{{ inventory_hostname }}' -# SHUT UP NAGIOS -- nagios: +- name: Shut up nagios + nagios: action: silence_nagios -# ANNOY ME NAGIOS -- nagios: +- name: Annoy me negios + nagios: action: unsilence_nagios -# command something -- nagios: +- name: Command something + nagios: action: command command: DISABLE_FAILURE_PREDICTION ''' diff --git a/plugins/modules/monitoring/newrelic_deployment.py b/plugins/modules/monitoring/newrelic_deployment.py index a28b992a80..7c643b2b73 100644 --- a/plugins/modules/monitoring/newrelic_deployment.py +++ b/plugins/modules/monitoring/newrelic_deployment.py @@ -64,7 +64,8 @@ requirements: [] ''' EXAMPLES = ''' -- newrelic_deployment: +- name: Notify newrelic about an app deployment + newrelic_deployment: token: AAAAAA app_name: myapp user: ansible deployment diff --git a/plugins/modules/monitoring/pagerduty.py b/plugins/modules/monitoring/pagerduty.py index e21f68617c..0fe49c3c2c 100644 --- a/plugins/modules/monitoring/pagerduty.py +++ b/plugins/modules/monitoring/pagerduty.py @@ -68,22 +68,22 @@ options: ''' EXAMPLES = ''' -# List ongoing maintenance windows using a token -- pagerduty: +- name: List ongoing maintenance windows using a token + pagerduty: name: companyabc token: xxxxxxxxxxxxxx state: ongoing -# Create a 1 hour maintenance window for service FOO123 -- pagerduty: +- name: Create a 1 hour maintenance window for service FOO123 + pagerduty: name: companyabc user: example@example.com token: yourtoken state: running service: FOO123 -# Create a 5 minute maintenance window for service FOO123 -- pagerduty: +- name: Create a 5 minute maintenance window for service FOO123 + pagerduty: name: companyabc token: xxxxxxxxxxxxxx hours: 0 @@ -92,8 +92,8 @@ EXAMPLES = ''' service: FOO123 -# Create a 4 hour maintenance window for service FOO123 with the description "deployment". -- pagerduty: +- name: Create a 4 hour maintenance window for service FOO123 with the description "deployment" + pagerduty: name: companyabc user: example@example.com state: running @@ -102,26 +102,28 @@ EXAMPLES = ''' desc: deployment register: pd_window -# Delete the previous maintenance window -- pagerduty: +- name: Delete the previous maintenance window + pagerduty: name: companyabc user: example@example.com state: absent 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. -- pagerduty: +# Delete a maintenance window from a separate playbook than its creation, +# and if it is the only existing maintenance window +- name: Check + pagerduty: requester_id: XXXXXXX token: yourtoken state: ongoing register: pd_window -- pagerduty: +- name: Delete + pagerduty: requester_id: XXXXXXX token: yourtoken state: absent window_id: "{{ pd_window.result.maintenance_windows[0].id }}" - ''' import datetime diff --git a/plugins/modules/monitoring/pagerduty_alert.py b/plugins/modules/monitoring/pagerduty_alert.py index 9c0030d0ca..c09c372fd8 100644 --- a/plugins/modules/monitoring/pagerduty_alert.py +++ b/plugins/modules/monitoring/pagerduty_alert.py @@ -73,8 +73,8 @@ options: ''' EXAMPLES = ''' -# Trigger an incident with just the basic options -- pagerduty_alert: +- name: Trigger an incident with just the basic options + pagerduty_alert: name: companyabc integration_key: xxx api_key: yourapikey @@ -82,8 +82,8 @@ EXAMPLES = ''' state: triggered desc: problem that led to this trigger -# Trigger an incident with more options -- pagerduty_alert: +- name: Trigger an incident with more options + pagerduty_alert: integration_key: xxx api_key: yourapikey service_id: PDservice @@ -93,8 +93,8 @@ EXAMPLES = ''' client: Sample Monitoring Service client_url: http://service.example.com -# Acknowledge an incident based on incident_key -- pagerduty_alert: +- name: Acknowledge an incident based on incident_key + pagerduty_alert: integration_key: xxx api_key: yourapikey service_id: PDservice @@ -102,8 +102,8 @@ EXAMPLES = ''' incident_key: somekey desc: "some text for incident's log" -# Resolve an incident based on incident_key -- pagerduty_alert: +- name: Resolve an incident based on incident_key + pagerduty_alert: integration_key: xxx api_key: yourapikey service_id: PDservice diff --git a/plugins/modules/monitoring/pingdom.py b/plugins/modules/monitoring/pingdom.py index 1f4646c227..556045f839 100644 --- a/plugins/modules/monitoring/pingdom.py +++ b/plugins/modules/monitoring/pingdom.py @@ -45,16 +45,16 @@ notes: ''' EXAMPLES = ''' -# Pause the check with the ID of 12345. -- pingdom: +- name: Pause the check with the ID of 12345 + pingdom: uid: example@example.com passwd: password123 key: apipassword123 checkid: 12345 state: paused -# Unpause the check with the ID of 12345. -- pingdom: +- name: Unpause the check with the ID of 12345 + pingdom: uid: example@example.com passwd: password123 key: apipassword123 diff --git a/plugins/modules/monitoring/stackdriver.py b/plugins/modules/monitoring/stackdriver.py index 5ddbd2441b..d9fbcf961f 100644 --- a/plugins/modules/monitoring/stackdriver.py +++ b/plugins/modules/monitoring/stackdriver.py @@ -57,7 +57,8 @@ options: ''' EXAMPLES = ''' -- stackdriver: +- name: Send a code deploy event to stackdriver + stackdriver: key: AAAAAA event: deploy deployed_to: production @@ -65,7 +66,8 @@ EXAMPLES = ''' repository: MyWebApp revision_id: abcd123 -- stackdriver: +- name: Send an annotation event to stackdriver + stackdriver: key: AAAAAA event: annotation msg: Greetings from Ansible diff --git a/plugins/modules/monitoring/uptimerobot.py b/plugins/modules/monitoring/uptimerobot.py index d7bf98dc34..c28dd358f8 100644 --- a/plugins/modules/monitoring/uptimerobot.py +++ b/plugins/modules/monitoring/uptimerobot.py @@ -35,14 +35,14 @@ notes: ''' EXAMPLES = ''' -# Pause the monitor with an ID of 12345. -- uptimerobot: +- name: Pause the monitor with an ID of 12345 + uptimerobot: monitorid: 12345 apikey: 12345-1234512345 state: paused -# Start the monitor with an ID of 12345. -- uptimerobot: +- name: Start the monitor with an ID of 12345 + uptimerobot: monitorid: 12345 apikey: 12345-1234512345 state: started diff --git a/plugins/modules/notification/campfire.py b/plugins/modules/notification/campfire.py index d995fee4e8..605fd719ef 100644 --- a/plugins/modules/notification/campfire.py +++ b/plugins/modules/notification/campfire.py @@ -52,13 +52,15 @@ author: "Adam Garside (@fabulops)" ''' EXAMPLES = ''' -- campfire: +- name: Send a message to Campfire + campfire: subscription: foo token: 12345 room: 123 msg: Task completed. -- campfire: +- name: Send a message to Campfire + campfire: subscription: foo token: 12345 room: 123 diff --git a/plugins/modules/notification/flowdock.py b/plugins/modules/notification/flowdock.py index b34e211abe..741348e523 100644 --- a/plugins/modules/notification/flowdock.py +++ b/plugins/modules/notification/flowdock.py @@ -77,7 +77,8 @@ requirements: [ ] ''' EXAMPLES = ''' -- flowdock: +- name: Send a message to a flowdock + flowdock: type: inbox token: AAAAAA from_address: user@example.com @@ -85,7 +86,8 @@ EXAMPLES = ''' msg: test from ansible subject: test subject -- flowdock: +- name: Send a message to a flowdock + flowdock: type: chat token: AAAAAA external_user_name: testuser diff --git a/plugins/modules/notification/grove.py b/plugins/modules/notification/grove.py index 7f9cf9b51c..eff5e2b1c0 100644 --- a/plugins/modules/notification/grove.py +++ b/plugins/modules/notification/grove.py @@ -47,10 +47,11 @@ author: "Jonas Pfenniger (@zimbatm)" ''' EXAMPLES = ''' -- grove: > - channel_token=6Ph62VBBJOccmtTPZbubiPzdrhipZXtg - service=my-app - message=deployed {{ target }} +- name: Sends a notification to a grove.io channel + grove: + channel_token: 6Ph62VBBJOccmtTPZbubiPzdrhipZXtg + service: my-app + message: 'deployed {{ target }}' ''' from ansible.module_utils.basic import AnsibleModule diff --git a/plugins/modules/notification/hipchat.py b/plugins/modules/notification/hipchat.py index e2a765597c..cc82bb2f4f 100644 --- a/plugins/modules/notification/hipchat.py +++ b/plugins/modules/notification/hipchat.py @@ -65,12 +65,13 @@ author: ''' EXAMPLES = ''' -- hipchat: +- name: Send a message to a Hipchat room + hipchat: room: notif msg: Ansible task finished -# Use Hipchat API version 2 -- hipchat: +- name: Send a message to a Hipchat room using Hipchat API version 2 + hipchat: api: https://api.hipchat.com/v2/ token: OAUTH2_TOKEN room: notify diff --git a/plugins/modules/notification/irc.py b/plugins/modules/notification/irc.py index e7dfd811ea..a416536cc3 100644 --- a/plugins/modules/notification/irc.py +++ b/plugins/modules/notification/irc.py @@ -83,12 +83,14 @@ author: ''' EXAMPLES = ''' -- irc: +- name: Send a message to an IRC channel from nick ansible + irc: server: irc.example.net channel: #t1 msg: Hello world -- local_action: +- name: Send a message to an IRC channel + local_action: module: irc port: 6669 server: irc.example.net @@ -97,7 +99,8 @@ EXAMPLES = ''' color: red nick: ansibleIRC -- local_action: +- name: Send a message to an IRC channel + local_action: module: irc port: 6669 server: irc.example.net diff --git a/plugins/modules/notification/jabber.py b/plugins/modules/notification/jabber.py index 42ab724681..b6b8a0fa5b 100644 --- a/plugins/modules/notification/jabber.py +++ b/plugins/modules/notification/jabber.py @@ -49,22 +49,22 @@ author: "Brian Coca (@bcoca)" ''' EXAMPLES = ''' -# send a message to a user -- jabber: +- name: Send a message to a user + jabber: user: mybot@example.net password: secret to: friend@example.net msg: Ansible task finished -# send a message to a room -- jabber: +- name: Send a message to a room + jabber: user: mybot@example.net password: secret to: mychaps@conference.example.net/ansiblebot msg: Ansible task finished -# send a message, specifying the host and port -- jabber: +- name: Send a message, specifying the host and port + jabber: user: mybot@example.net host: talk.example.net port: 5223 diff --git a/plugins/modules/notification/logentries_msg.py b/plugins/modules/notification/logentries_msg.py index 2dadaee073..ac2372187c 100644 --- a/plugins/modules/notification/logentries_msg.py +++ b/plugins/modules/notification/logentries_msg.py @@ -39,7 +39,8 @@ author: "Jimmy Tang (@jcftang) " RETURN = '''# ''' EXAMPLES = ''' -- logentries_msg: +- name: Send a message to logentries + logentries_msg: token=00000000-0000-0000-0000-000000000000 msg="{{ ansible_hostname }}" ''' diff --git a/plugins/modules/notification/mqtt.py b/plugins/modules/notification/mqtt.py index 3a36867826..89898ca559 100644 --- a/plugins/modules/notification/mqtt.py +++ b/plugins/modules/notification/mqtt.py @@ -95,7 +95,8 @@ author: "Jan-Piet Mens (@jpmens)" ''' EXAMPLES = ''' -- mqtt: +- name: Publish a message on an MQTT topic + mqtt: topic: 'service/ansible/{{ ansible_hostname }}' payload: 'Hello at {{ ansible_date_time.iso8601 }}' qos: 0 diff --git a/plugins/modules/notification/pushbullet.py b/plugins/modules/notification/pushbullet.py index e67f8024b9..b1ba17ba4a 100644 --- a/plugins/modules/notification/pushbullet.py +++ b/plugins/modules/notification/pushbullet.py @@ -50,28 +50,28 @@ notes: ''' EXAMPLES = ''' -# Sends a push notification to a device -- pushbullet: +- name: Sends a push notification to a device + pushbullet: api_key: "ABC123abc123ABC123abc123ABC123ab" device: "Chrome" title: "You may see this on Google Chrome" -# Sends a link to a device -- pushbullet: +- name: Sends a link to a device + pushbullet: api_key: ABC123abc123ABC123abc123ABC123ab device: Chrome push_type: link title: Ansible Documentation body: https://docs.ansible.com/ -# Sends a push notification to a channel -- pushbullet: +- name: Sends a push notification to a channel + pushbullet: api_key: ABC123abc123ABC123abc123ABC123ab channel: my-awesome-channel title: Broadcasting a message to the #my-awesome-channel folks -# Sends a push notification with title and body to a channel -- pushbullet: +- name: Sends a push notification with title and body to a channel + pushbullet: api_key: ABC123abc123ABC123abc123ABC123ab channel: my-awesome-channel title: ALERT! Signup service is down diff --git a/plugins/modules/notification/pushover.py b/plugins/modules/notification/pushover.py index 1fd00f997e..dc26f501a7 100644 --- a/plugins/modules/notification/pushover.py +++ b/plugins/modules/notification/pushover.py @@ -43,13 +43,15 @@ author: "Jim Richardson (@weaselkeeper)" ''' EXAMPLES = ''' -- pushover: +- name: Send notifications via pushover.net + pushover: msg: '{{ inventory_hostname }} is acting strange ...' app_token: wxfdksl user_key: baa5fe97f2c5ab3ca8f0bb59 delegate_to: localhost -- pushover: +- name: Send notifications via pushover.net + pushover: title: 'Alert!' msg: '{{ inventory_hostname }} has exploded in flames, It is now time to panic' pri: 1 diff --git a/plugins/modules/notification/say.py b/plugins/modules/notification/say.py index a86a98f974..5d0a237cc6 100644 --- a/plugins/modules/notification/say.py +++ b/plugins/modules/notification/say.py @@ -34,7 +34,8 @@ author: ''' EXAMPLES = ''' -- say: +- name: Makes a computer to speak + say: msg: '{{ inventory_hostname }} is all done' voice: Zarvox delegate_to: localhost diff --git a/plugins/modules/notification/sendgrid.py b/plugins/modules/notification/sendgrid.py index b881f413c3..eca2df2cef 100644 --- a/plugins/modules/notification/sendgrid.py +++ b/plugins/modules/notification/sendgrid.py @@ -74,8 +74,8 @@ author: "Matt Makai (@makaimc)" ''' EXAMPLES = ''' -# send an email to a single recipient that the deployment was successful -- sendgrid: +- name: Send an email to a single recipient that the deployment was successful + sendgrid: username: "{{ sendgrid_username }}" password: "{{ sendgrid_password }}" from_address: "ansible@mycompany.com" @@ -85,8 +85,8 @@ EXAMPLES = ''' body: "The most recent Ansible deployment was successful." delegate_to: localhost -# send an email to more than one recipient that the build failed -- sendgrid: +- name: Send an email to more than one recipient that the build failed + sendgrid: username: "{{ sendgrid_username }}" password: "{{ sendgrid_password }}" from_address: "build@mycompany.com" diff --git a/plugins/modules/notification/twilio.py b/plugins/modules/notification/twilio.py index 9518e9b4b9..71b832a00b 100644 --- a/plugins/modules/notification/twilio.py +++ b/plugins/modules/notification/twilio.py @@ -55,7 +55,8 @@ EXAMPLES = ''' # send an SMS about the build status to (555) 303 5681 # note: replace account_sid and auth_token values with your credentials # 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. account_sid: ACXXXXXXXXXXXXXXXXX auth_token: ACXXXXXXXXXXXXXXXXX @@ -66,7 +67,8 @@ EXAMPLES = ''' # send an SMS to multiple phone numbers about the deployment # note: replace account_sid and auth_token values with your credentials # 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. account_sid: ACXXXXXXXXXXXXXXXXX auth_token: ACXXXXXXXXXXXXXXXXX @@ -81,7 +83,8 @@ EXAMPLES = ''' # and an image of the results # note: replace account_sid and auth_token values with your credentials # 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! account_sid: ACXXXXXXXXXXXXXXXXX auth_token: ACXXXXXXXXXXXXXXXXX diff --git a/plugins/modules/notification/typetalk.py b/plugins/modules/notification/typetalk.py index 253d1d7b95..2ce45264cd 100644 --- a/plugins/modules/notification/typetalk.py +++ b/plugins/modules/notification/typetalk.py @@ -36,7 +36,8 @@ author: "Takashi Someda (@tksmd)" ''' EXAMPLES = ''' -- typetalk: +- name: Send a message to typetalk + typetalk: client_id: 12345 client_secret: 12345 topic: 1 diff --git a/plugins/modules/packaging/language/bundler.py b/plugins/modules/packaging/language/bundler.py index b4162d7438..7ad3d42f43 100644 --- a/plugins/modules/packaging/language/bundler.py +++ b/plugins/modules/packaging/language/bundler.py @@ -83,28 +83,28 @@ author: "Tim Hoiberg (@thoiberg)" ''' EXAMPLES = ''' -# Installs gems from a Gemfile in the current directory -- bundler: +- name: Install gems from a Gemfile in the current directory + bundler: state: present executable: ~/.rvm/gems/2.1.5/bin/bundle -# Excludes the production group from installing -- bundler: +- name: Exclude the production group from installing + bundler: state: present exclude_groups: production -# Install gems into ./vendor/bundle -- bundler: +- name: Install gems into ./vendor/bundle + bundler: state: present deployment_mode: yes -# Installs gems using a Gemfile in another directory -- bundler: +- name: Install gems using a Gemfile in another directory + bundler: state: present gemfile: ../rails_project/Gemfile -# Updates Gemfile in another directory -- bundler: +- name: Update Gemfile in another directory + bundler: state: latest chdir: ~/rails_project ''' diff --git a/plugins/modules/packaging/language/composer.py b/plugins/modules/packaging/language/composer.py index f2e8ae13c4..7ea5b9d045 100644 --- a/plugins/modules/packaging/language/composer.py +++ b/plugins/modules/packaging/language/composer.py @@ -111,25 +111,26 @@ notes: ''' EXAMPLES = ''' -# Downloads and installs all the libs and dependencies outlined in the /path/to/project/composer.lock -- composer: +- name: Download and installs all libs and dependencies outlined in the /path/to/project/composer.lock + composer: command: install working_dir: /path/to/project -- composer: +- name: install a new package + composer: command: require arguments: my/package working_dir: /path/to/project -# Clone project and install with all dependencies -- composer: +- name: Clone and install a project with all dependencies + composer: command: create-project arguments: package/package /path/to/project ~1.0 working_dir: /path/to/project prefer_dist: yes -# Installs package globally -- composer: +- name: Install a package globally + composer: command: require global_command: yes arguments: my/package diff --git a/plugins/modules/packaging/language/cpanm.py b/plugins/modules/packaging/language/cpanm.py index 4ada0f861a..1f4351fff2 100644 --- a/plugins/modules/packaging/language/cpanm.py +++ b/plugins/modules/packaging/language/cpanm.py @@ -66,42 +66,41 @@ author: "Franck Cuny (@fcuny)" ''' EXAMPLES = ''' -# install Dancer perl package -- cpanm: +- name: Install Dancer perl package + cpanm: name: Dancer -# install version 0.99_05 of the Plack perl package -- cpanm: +- name: Install version 0.99_05 of the Plack perl package + cpanm: name: MIYAGAWA/Plack-0.99_05.tar.gz -# install Dancer into the specified locallib -- cpanm: +- name: Install Dancer into the specified locallib + cpanm: name: Dancer locallib: /srv/webapps/my_app/extlib -# install perl dependencies from local directory -- cpanm: +- name: Install perl dependencies from local directory + cpanm: from_path: /srv/webapps/my_app/src/ -# install Dancer perl package without running the unit tests in indicated locallib -- cpanm: +- name: Install Dancer perl package without running the unit tests in indicated locallib + cpanm: name: Dancer notest: True locallib: /srv/webapps/my_app/extlib -# install Dancer perl package from a specific mirror -- cpanm: +- name: Install Dancer perl package from a specific mirror + cpanm: name: Dancer mirror: 'http://cpan.cpantesters.org/' -# install Dancer perl package into the system root path -- cpanm: +- name: Install Dancer perl package into the system root path + cpanm: name: Dancer system_lib: yes -# install Dancer if it's not already installed -# OR the installed version is older than version 1.0 -- cpanm: +- name: Install Dancer if it is not already installed OR the installed version is older than version 1.0 + cpanm: name: Dancer version: '1.0' ''' diff --git a/plugins/modules/packaging/language/easy_install.py b/plugins/modules/packaging/language/easy_install.py index 03c1580ebc..3256f0813c 100644 --- a/plugins/modules/packaging/language/easy_install.py +++ b/plugins/modules/packaging/language/easy_install.py @@ -61,13 +61,13 @@ author: "Matt Wright (@mattupstate)" ''' EXAMPLES = ''' -# Examples from Ansible Playbooks -- easy_install: +- name: Install or update pip + easy_install: name: pip state: latest -# Install Bottle into the specified virtualenv. -- easy_install: +- name: Install Bottle into the specified virtualenv + easy_install: name: bottle virtualenv: /webapps/myapp/venv ''' diff --git a/plugins/modules/packaging/language/gem.py b/plugins/modules/packaging/language/gem.py index f34fce8b8c..e9fd0e224b 100644 --- a/plugins/modules/packaging/language/gem.py +++ b/plugins/modules/packaging/language/gem.py @@ -94,19 +94,19 @@ author: ''' EXAMPLES = ''' -# Installs version 1.0 of vagrant. -- gem: +- name: Install version 1.0 of vagrant + gem: name: vagrant version: 1.0 state: present -# Installs latest available version of rake. -- gem: +- name: Install latest available version of rake + gem: name: rake state: latest -# Installs rake version 1.0 from a local gem on disk. -- gem: +- name: Install rake version 1.0 from a local gem on disk + gem: name: rake gem_source: /path/to/gems/rake-1.0.gem state: present diff --git a/plugins/modules/packaging/language/maven_artifact.py b/plugins/modules/packaging/language/maven_artifact.py index 50a26f369a..1ff02616bd 100644 --- a/plugins/modules/packaging/language/maven_artifact.py +++ b/plugins/modules/packaging/language/maven_artifact.py @@ -119,21 +119,21 @@ extends_documentation_fragment: ''' EXAMPLES = ''' -# Download the latest version of the JUnit framework artifact from Maven Central -- maven_artifact: +- name: Download the latest version of the JUnit framework artifact from Maven Central + maven_artifact: group_id: junit artifact_id: junit dest: /tmp/junit-latest.jar -# Download JUnit 4.11 from Maven Central -- maven_artifact: +- name: Download JUnit 4.11 from Maven Central + maven_artifact: group_id: junit artifact_id: junit version: 4.11 dest: /tmp/junit-4.11.jar -# Download an artifact from a private repository requiring authentication -- maven_artifact: +- name: Download an artifact from a private repository requiring authentication + maven_artifact: group_id: com.company artifact_id: library-name repository_url: 'https://repo.company.com/maven' @@ -141,31 +141,31 @@ EXAMPLES = ''' password: pass dest: /tmp/library-name-latest.jar -# Download a WAR File to the Tomcat webapps directory to be deployed -- maven_artifact: +- name: Download a WAR File to the Tomcat webapps directory to be deployed + maven_artifact: group_id: com.company artifact_id: web-app extension: war repository_url: 'https://repo.company.com/maven' dest: /var/lib/tomcat7/webapps/web-app.war -# Keep a downloaded artifact's name, i.e. retain the version -- maven_artifact: +- name: Keep a downloaded artifact's name, i.e. retain the version + maven_artifact: version: latest artifact_id: spring-core group_id: org.springframework dest: /tmp/ keep_name: yes -# Download the latest version of the JUnit framework artifact from Maven local -- maven_artifact: +- name: Download the latest version of the JUnit framework artifact from Maven local + maven_artifact: group_id: junit artifact_id: junit dest: /tmp/junit-latest.jar 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 -- maven_artifact: +- name: Download the latest version between 3.8 and 4.0 (exclusive) of the JUnit framework artifact from Maven Central + maven_artifact: group_id: junit artifact_id: junit version_by_spec: "[3.8,4.0)" diff --git a/plugins/modules/packaging/language/pear.py b/plugins/modules/packaging/language/pear.py index 6413b549db..5ea34a8ea1 100644 --- a/plugins/modules/packaging/language/pear.py +++ b/plugins/modules/packaging/language/pear.py @@ -36,23 +36,23 @@ options: ''' EXAMPLES = ''' -# Install pear package -- pear: +- name: Install pear package + pear: name: Net_URL2 state: present -# Install pecl package -- pear: +- name: Install pecl package + pear: name: pecl/json_post state: present -# Upgrade package -- pear: +- name: Upgrade package + pear: name: Net_URL2 state: latest -# Remove packages -- pear: +- name: Remove packages + pear: name: Net_URL2,pecl/json_post state: absent '''