Fix Ansible documentation in part of example formatting. Part 1 (#332)

* Fix Ansible documentation in part of example formatting

* Fix
This commit is contained in:
Andrew Klychkov 2020-05-15 13:13:45 +03:00 committed by GitHub
parent 983d937b7b
commit 328319b926
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
70 changed files with 762 additions and 705 deletions

View file

@ -101,10 +101,8 @@ author:
'''
EXAMPLES = '''
# Provisioning example. Create and destroy a firewall policy.
- oneandone_firewall_policy:
- name: Create a firewall policy
oneandone_firewall_policy:
auth_token: oneandone_private_api_key
name: ansible-firewall-policy
description: Testing creation of firewall policies with ansible
@ -117,23 +115,22 @@ EXAMPLES = '''
wait: true
wait_timeout: 500
- oneandone_firewall_policy:
- name: Destroy a firewall policy
oneandone_firewall_policy:
auth_token: oneandone_private_api_key
state: absent
name: ansible-firewall-policy
# Update a firewall policy.
- oneandone_firewall_policy:
- name: Update a firewall policy
oneandone_firewall_policy:
auth_token: oneandone_private_api_key
state: update
firewall_policy: ansible-firewall-policy
name: ansible-firewall-policy-updated
description: Testing creation of firewall policies with ansible - updated
# Add server to a firewall policy.
- oneandone_firewall_policy:
- name: Add server to a firewall policy
oneandone_firewall_policy:
auth_token: oneandone_private_api_key
firewall_policy: ansible-firewall-policy-updated
add_server_ips:
@ -143,9 +140,8 @@ EXAMPLES = '''
wait_timeout: 500
state: update
# Remove server from a firewall policy.
- oneandone_firewall_policy:
- name: Remove server from a firewall policy
oneandone_firewall_policy:
auth_token: oneandone_private_api_key
firewall_policy: ansible-firewall-policy-updated
remove_server_ips:
@ -154,9 +150,8 @@ EXAMPLES = '''
wait_timeout: 500
state: update
# Add rules to a firewall policy.
- oneandone_firewall_policy:
- name: Add rules to a firewall policy
oneandone_firewall_policy:
auth_token: oneandone_private_api_key
firewall_policy: ansible-firewall-policy-updated
description: Adding rules to an existing firewall policy
@ -175,9 +170,8 @@ EXAMPLES = '''
wait_timeout: 500
state: update
# Remove rules from a firewall policy.
- oneandone_firewall_policy:
- name: Remove rules from a firewall policy
oneandone_firewall_policy:
auth_token: oneandone_private_api_key
firewall_policy: ansible-firewall-policy-updated
remove_rules:
@ -187,7 +181,6 @@ EXAMPLES = '''
wait: true
wait_timeout: 500
state: update
'''
RETURN = '''

View file

@ -138,10 +138,8 @@ author:
'''
EXAMPLES = '''
# Provisioning example. Create and destroy a load balancer.
- oneandone_load_balancer:
- name: Create a load balancer
oneandone_load_balancer:
auth_token: oneandone_private_api_key
name: ansible load balancer
description: Testing creation of load balancer with ansible
@ -160,16 +158,16 @@ EXAMPLES = '''
wait: true
wait_timeout: 500
- oneandone_load_balancer:
- name: Destroy a load balancer
oneandone_load_balancer:
auth_token: oneandone_private_api_key
name: ansible load balancer
wait: true
wait_timeout: 500
state: absent
# Update a load balancer.
- oneandone_load_balancer:
- name: Update a load balancer
oneandone_load_balancer:
auth_token: oneandone_private_api_key
load_balancer: ansible load balancer
name: ansible load balancer updated
@ -178,9 +176,8 @@ EXAMPLES = '''
wait_timeout: 500
state: update
# Add server to a load balancer.
- oneandone_load_balancer:
- name: Add server to a load balancer
oneandone_load_balancer:
auth_token: oneandone_private_api_key
load_balancer: ansible load balancer updated
description: Adding server to a load balancer with ansible
@ -190,9 +187,8 @@ EXAMPLES = '''
wait_timeout: 500
state: update
# Remove server from a load balancer.
- oneandone_load_balancer:
- name: Remove server from a load balancer
oneandone_load_balancer:
auth_token: oneandone_private_api_key
load_balancer: ansible load balancer updated
description: Removing server from a load balancer with ansible
@ -202,9 +198,8 @@ EXAMPLES = '''
wait_timeout: 500
state: update
# Add rules to a load balancer.
- oneandone_load_balancer:
- name: Add rules to a load balancer
oneandone_load_balancer:
auth_token: oneandone_private_api_key
load_balancer: ansible load balancer updated
description: Adding rules to a load balancer with ansible
@ -223,9 +218,8 @@ EXAMPLES = '''
wait_timeout: 500
state: update
# Remove rules from a load balancer.
- oneandone_load_balancer:
- name: Remove rules from a load balancer
oneandone_load_balancer:
auth_token: oneandone_private_api_key
load_balancer: ansible load balancer updated
description: Adding rules to a load balancer with ansible

View file

@ -183,10 +183,8 @@ author:
'''
EXAMPLES = '''
# Provisioning example. Create and destroy a monitoring policy.
- oneandone_moitoring_policy:
- name: Create a monitoring policy
oneandone_moitoring_policy:
auth_token: oneandone_private_api_key
name: ansible monitoring policy
description: Testing creation of a monitoring policy with ansible
@ -246,14 +244,14 @@ EXAMPLES = '''
email_notification: false
wait: true
- oneandone_moitoring_policy:
- name: Destroy a monitoring policy
oneandone_moitoring_policy:
auth_token: oneandone_private_api_key
state: absent
name: ansible monitoring policy
# Update a monitoring policy.
- oneandone_moitoring_policy:
- name: Update a monitoring policy
oneandone_moitoring_policy:
auth_token: oneandone_private_api_key
monitoring_policy: ansible monitoring policy
name: ansible monitoring policy updated
@ -303,9 +301,8 @@ EXAMPLES = '''
wait: true
state: update
# Add a port to a monitoring policy.
- oneandone_moitoring_policy:
- name: Add a port to a monitoring policy
oneandone_moitoring_policy:
auth_token: oneandone_private_api_key
monitoring_policy: ansible monitoring policy updated
add_ports:
@ -317,9 +314,8 @@ EXAMPLES = '''
wait: true
state: update
# Update existing ports of a monitoring policy.
- oneandone_moitoring_policy:
- name: Update existing ports of a monitoring policy
oneandone_moitoring_policy:
auth_token: oneandone_private_api_key
monitoring_policy: ansible monitoring policy updated
update_ports:
@ -338,18 +334,16 @@ EXAMPLES = '''
wait: true
state: update
# Remove a port from a monitoring policy.
- oneandone_moitoring_policy:
- name: Remove a port from a monitoring policy
oneandone_moitoring_policy:
auth_token: oneandone_private_api_key
monitoring_policy: ansible monitoring policy updated
remove_ports:
- port_id
state: update
# Add a process to a monitoring policy.
- oneandone_moitoring_policy:
- name: Add a process to a monitoring policy
oneandone_moitoring_policy:
auth_token: oneandone_private_api_key
monitoring_policy: ansible monitoring policy updated
add_processes:
@ -360,9 +354,8 @@ EXAMPLES = '''
wait: true
state: update
# Update existing processes of a monitoring policy.
- oneandone_moitoring_policy:
- name: Update existing processes of a monitoring policy
oneandone_moitoring_policy:
auth_token: oneandone_private_api_key
monitoring_policy: ansible monitoring policy updated
update_processes:
@ -379,9 +372,8 @@ EXAMPLES = '''
wait: true
state: update
# Remove a process from a monitoring policy.
- oneandone_moitoring_policy:
- name: Remove a process from a monitoring policy
oneandone_moitoring_policy:
auth_token: oneandone_private_api_key
monitoring_policy: ansible monitoring policy updated
remove_processes:
@ -389,9 +381,8 @@ EXAMPLES = '''
wait: true
state: update
# Add server to a monitoring policy.
- oneandone_moitoring_policy:
- name: Add server to a monitoring policy
oneandone_moitoring_policy:
auth_token: oneandone_private_api_key
monitoring_policy: ansible monitoring policy updated
add_servers:
@ -399,9 +390,8 @@ EXAMPLES = '''
wait: true
state: update
# Remove server from a monitoring policy.
- oneandone_moitoring_policy:
- name: Remove server from a monitoring policy
oneandone_moitoring_policy:
auth_token: oneandone_private_api_key
monitoring_policy: ansible monitoring policy updated
remove_servers:

View file

@ -91,10 +91,8 @@ author:
'''
EXAMPLES = '''
# Provisioning example. Create and destroy private networks.
- oneandone_private_network:
- name: Create a private network
oneandone_private_network:
auth_token: oneandone_private_api_key
name: backup_network
description: Testing creation of a private network with ansible
@ -102,38 +100,35 @@ EXAMPLES = '''
subnet_mask: 255.0.0.0
datacenter: US
- oneandone_private_network:
- name: Destroy a private network
oneandone_private_network:
auth_token: oneandone_private_api_key
state: absent
name: backup_network
# Modify the private network.
- oneandone_private_network:
- name: Modify the private network
oneandone_private_network:
auth_token: oneandone_private_api_key
state: update
private_network: backup_network
network_address: 192.168.2.0
subnet_mask: 255.255.255.0
# Add members to the private network.
- oneandone_private_network:
- name: Add members to the private network
oneandone_private_network:
auth_token: oneandone_private_api_key
state: update
private_network: backup_network
add_members:
- server identifier (id or name)
# Remove members from the private network.
- oneandone_private_network:
- name: Remove members from the private network
oneandone_private_network:
auth_token: oneandone_private_api_key
state: update
private_network: backup_network
remove_members:
- server identifier (id or name)
'''
RETURN = '''

View file

@ -83,31 +83,25 @@ author:
'''
EXAMPLES = '''
# Create a public IP.
- oneandone_public_ip:
- name: Create a public IP
oneandone_public_ip:
auth_token: oneandone_private_api_key
reverse_dns: example.com
datacenter: US
type: IPV4
# Update a public IP.
- oneandone_public_ip:
- name: Update a public IP
oneandone_public_ip:
auth_token: oneandone_private_api_key
public_ip_id: public ip id
reverse_dns: secondexample.com
state: update
# Delete a public IP
- oneandone_public_ip:
- name: Delete a public IP
oneandone_public_ip:
auth_token: oneandone_private_api_key
public_ip_id: public ip id
state: absent
'''
RETURN = '''

View file

@ -139,10 +139,8 @@ author:
'''
EXAMPLES = '''
# Provisioning example. Creates three servers and enumerate their names.
- oneandone_server:
- name: Create three servers and enumerate their names
oneandone_server:
auth_token: oneandone_private_api_key
hostname: node%02d
fixed_instance_size: XL
@ -151,9 +149,8 @@ EXAMPLES = '''
auto_increment: true
count: 3
# Create three servers, passing in an ssh_key.
- oneandone_server:
- name: Create three servers, passing in an ssh_key
oneandone_server:
auth_token: oneandone_private_api_key
hostname: node%02d
vcore: 2
@ -170,23 +167,20 @@ EXAMPLES = '''
wait_interval: 10
ssh_key: SSH_PUBLIC_KEY
# Removing server
- oneandone_server:
- name: Removing server
oneandone_server:
auth_token: oneandone_private_api_key
state: absent
server: 'node01'
# Starting server.
- oneandone_server:
- name: Starting server
oneandone_server:
auth_token: oneandone_private_api_key
state: running
server: 'node01'
# Stopping server
- oneandone_server:
- name: Stopping server
oneandone_server:
auth_token: oneandone_private_api_key
state: stopped
server: 'node01'