Use addresses and names reserved for documentation (#2894)

Trying to preserve the meaning of the examples.

Related to: https://github.com/ansible/ansible/issues/17479
reviewable/pr18780/r1
Robin Schneider 8 years ago committed by René Moser
parent 061c6517eb
commit 67a1bebbd3

@ -198,7 +198,7 @@ interface:
mac_address: mac_address:
description: interface's physical address description: interface's physical address
type: string type: string
sample: "06:9a:27:6a:6f:99" sample: "00:00:5E:00:53:23"
owner_id: owner_id:
description: aws account id description: aws account id
type: string type: string

@ -29,7 +29,7 @@ options:
default: null default: null
cidr: cidr:
description: description:
- "The CIDR block for the subnet. E.g. 10.0.0.0/16. Only required when state=present." - "The CIDR block for the subnet. E.g. 192.0.2.0/24. Only required when state=present."
required: false required: false
default: null default: null
tags: tags:

@ -230,7 +230,7 @@ EXAMPLES = '''
imageOffer: "UbuntuServer" imageOffer: "UbuntuServer"
OSDiskName: "osdiskforlinuxsimple" OSDiskName: "osdiskforlinuxsimple"
nicName: "myVMNic" nicName: "myVMNic"
addressPrefix: "10.0.0.0/16" addressPrefix: "192.0.2.0/24"
subnetName: "Subnet" subnetName: "Subnet"
subnetPrefix: "10.0.0.0/24" subnetPrefix: "10.0.0.0/24"
storageAccountType: "Standard_LRS" storageAccountType: "Standard_LRS"

@ -263,7 +263,7 @@ EXAMPLES = '''
service_offering: Tiny service_offering: Tiny
ip_to_networks: ip_to_networks:
- {'network': NetworkA, 'ip': '10.1.1.1'} - {'network': NetworkA, 'ip': '10.1.1.1'}
- {'network': NetworkB, 'ip': '192.168.1.1'} - {'network': NetworkB, 'ip': '192.0.2.1'}
# Ensure an instance is stopped # Ensure an instance is stopped
- local_action: cs_instance name=web-vm-1 state=stopped - local_action: cs_instance name=web-vm-1 state=stopped

@ -193,10 +193,10 @@ EXAMPLES = '''
zone_id: 'example-com' zone_id: 'example-com'
type: A type: A
values: values:
- '10.1.2.3' - '192.0.2.23'
- '10.4.5.6' - '10.4.5.6'
- '10.7.8.9' - '198.51.100.5'
- '192.168.5.10' - '203.0.113.10'
# Change the value of an existing record with multiple values. # Change the value of an existing record with multiple values.
- gcdns_record: - gcdns_record:
@ -205,10 +205,10 @@ EXAMPLES = '''
type: A type: A
overwrite: true overwrite: true
values: # WARNING: All values in a record will be replaced values: # WARNING: All values in a record will be replaced
- '10.1.2.3' - '192.0.2.23'
- '10.5.5.7' # The changed record - '192.0.2.42' # The changed record
- '10.7.8.9' - '198.51.100.5'
- '192.168.5.10' - '203.0.113.10'
# Safely remove a multi-line record. # Safely remove a multi-line record.
- gcdns_record: - gcdns_record:
@ -217,10 +217,10 @@ EXAMPLES = '''
state: absent state: absent
type: A type: A
values: # NOTE: All of the values must match exactly values: # NOTE: All of the values must match exactly
- '10.1.2.3' - '192.0.2.23'
- '10.5.5.7' - '192.0.2.42'
- '10.7.8.9' - '198.51.100.5'
- '192.168.5.10' - '203.0.113.10'
# Unconditionally remove a record. # Unconditionally remove a record.
- gcdns_record: - gcdns_record:

@ -256,9 +256,9 @@ ovirt:
url: https://ovirt.example.com url: https://ovirt.example.com
hostname: testansible hostname: testansible
domain: ansible.local domain: ansible.local
ip: 192.168.1.100 ip: 192.0.2.100
netmask: 255.255.255.0 netmask: 255.255.255.0
gateway: 192.168.1.1 gateway: 192.0.2.1
rootpw: bigsecret rootpw: bigsecret
''' '''

@ -171,9 +171,9 @@ vm:
"size": 40 "size": 40
} }
], ],
"eth0": "00:1b:4a:1f:de:f4", "eth0": "00:00:5E:00:53:00",
"eth1": "00:1b:4a:1f:de:f5", "eth1": "00:00:5E:00:53:01",
"eth2": "00:1b:4a:1f:de:f6", "eth2": "00:00:5E:00:53:02",
"exists": true, "exists": true,
"failed": false, "failed": false,
"ifaces": [ "ifaces": [

@ -162,7 +162,7 @@ openstack_ports:
description: The MAC address. description: The MAC address.
returned: success returned: success
type: string type: string
sample: "fa:16:30:5f:10:f1" sample: "00:00:5E:00:53:42"
name: name:
description: The port name. description: The port name.
returned: success returned: success

@ -68,8 +68,8 @@ EXAMPLES = '''
state: present state: present
label: my_entity label: my_entity
named_ip_addresses: named_ip_addresses:
web_box: 192.168.0.10 web_box: 192.0.2.4
db_box: 192.168.0.11 db_box: 192.0.2.5
meta: meta:
hurf: durf hurf: durf
register: the_entity register: the_entity

@ -49,12 +49,12 @@ EXAMPLES = '''
fw_rules: fw_rules:
- description: "ben testing" - description: "ben testing"
source_ip: "Any" source_ip: "Any"
dest_ip: 192.168.2.11 dest_ip: 192.0.2.23
- description: "ben testing 2" - description: "ben testing 2"
source_ip: 192.168.2.100 source_ip: 192.0.2.50
source_port: "Any" source_port: "Any"
dest_port: "22" dest_port: "22"
dest_ip: 192.168.2.13 dest_ip: 192.0.2.101
is_enable: "true" is_enable: "true"
enable_logging: "false" enable_logging: "false"
protocol: "Tcp" protocol: "Tcp"

@ -53,8 +53,8 @@ EXAMPLES = '''
state: 'present' state: 'present'
nat_rules: nat_rules:
- rule_type: SNAT - rule_type: SNAT
original_ip: 192.168.2.10 original_ip: 192.0.2.42
translated_ip: 107.189.95.208 translated_ip: 203.0.113.23
#example for a DNAT #example for a DNAT
- hosts: localhost - hosts: localhost
@ -66,9 +66,9 @@ EXAMPLES = '''
state: 'present' state: 'present'
nat_rules: nat_rules:
- rule_type: DNAT - rule_type: DNAT
original_ip: 107.189.95.208 original_ip: 203.0.113.23
original_port: 22 original_port: 22
translated_ip: 192.168.2.10 translated_ip: 192.0.2.42
translated_port: 22 translated_port: 22
''' '''

@ -97,7 +97,7 @@ Example from Ansible playbook
- name: create the VM - name: create the VM
vmware_guest: vmware_guest:
validate_certs: False validate_certs: False
hostname: 192.168.1.209 hostname: 192.0.2.44
username: administrator@vsphere.local username: administrator@vsphere.local
password: vmware password: vmware
name: testvm_2 name: testvm_2
@ -117,7 +117,7 @@ Example from Ansible playbook
osid: centos64guest osid: centos64guest
scsi: paravirtual scsi: paravirtual
datacenter: datacenter1 datacenter: datacenter1
esxi_hostname: 192.168.1.117 esxi_hostname: 192.0.2.117
template: template_el7 template: template_el7
wait_for_ip_address: yes wait_for_ip_address: yes
register: deploy register: deploy

@ -108,8 +108,8 @@ EXAMPLES = '''
# Get master binlog file name and binlog position # Get master binlog file name and binlog position
- mysql_replication: mode=getmaster - mysql_replication: mode=getmaster
# Change master to master server 192.168.1.1 and use binary log 'mysql-bin.000009' with position 4578 # Change master to master server 192.0.2.1 and use binary log 'mysql-bin.000009' with position 4578
- mysql_replication: mode=changemaster master_host=192.168.1.1 master_log_file=mysql-bin.000009 master_log_pos=4578 - mysql_replication: mode=changemaster master_host=192.0.2.1 master_log_file=mysql-bin.000009 master_log_pos=4578
# Check slave status using port 3308 # Check slave status using port 3308
- mysql_replication: mode=getslave login_host=ansible.example.com login_port=3308 - mysql_replication: mode=getslave login_host=ansible.example.com login_port=3308

@ -116,7 +116,7 @@ EXAMPLES = r"""
dest: /etc/network/interfaces dest: /etc/network/interfaces
block: | block: |
iface eth0 inet static iface eth0 inet static
address 192.168.0.1 address 192.0.2.23
netmask 255.255.255.0 netmask 255.255.255.0
- name: insert/update HTML surrounded by custom markers after <body> line - name: insert/update HTML surrounded by custom markers after <body> line

@ -188,7 +188,7 @@ record:
description: the record content (details depend on record type) description: the record content (details depend on record type)
returned: success returned: success
type: string type: string
sample: 192.168.100.20 sample: 192.0.2.91
created_on: created_on:
description: the record creation date description: the record creation date
returned: success returned: success

@ -99,7 +99,7 @@ EXAMPLES = '''
- dnsmadeeasy: account_key=key account_secret=secret domain=my.com state=present record_name="test" record_type="A" record_value="127.0.0.1" - dnsmadeeasy: account_key=key account_secret=secret domain=my.com state=present record_name="test" record_type="A" record_value="127.0.0.1"
# update the previously created record # update the previously created record
- dnsmadeeasy: account_key=key account_secret=secret domain=my.com state=present record_name="test" record_value="192.168.0.1" - dnsmadeeasy: account_key=key account_secret=secret domain=my.com state=present record_name="test" record_value="192.0.2.23"
# fetch a specific record # fetch a specific record
- dnsmadeeasy: account_key=key account_secret=secret domain=my.com state=present record_name="test" - dnsmadeeasy: account_key=key account_secret=secret domain=my.com state=present record_name="test"

@ -98,17 +98,17 @@ name_servers:
description: List of name servers that were added or removed description: List of name servers that were added or removed
returned: changed returned: changed
type: list type: list
sample: "['192.168.1.10', '172.17.12.10']" sample: "['192.0.2.10', '172.17.12.10']"
forwarders: forwarders:
description: List of forwarders that were added or removed description: List of forwarders that were added or removed
returned: changed returned: changed
type: list type: list
sample: "['192.168.1.10', '172.17.12.10']" sample: "['192.0.2.10', '172.17.12.10']"
search: search:
description: List of search domains that were added or removed description: List of search domains that were added or removed
returned: changed returned: changed
type: list type: list
sample: "['192.168.1.10', '172.17.12.10']" sample: "['192.0.2.10', '172.17.12.10']"
ip_version: ip_version:
description: IP version that was set that DNS will specify IP addresses in description: IP version that was set that DNS will specify IP addresses in
returned: changed returned: changed

@ -60,7 +60,7 @@ EXAMPLES = '''
- name: Set NTP server - name: Set NTP server
bigip_device_ntp: bigip_device_ntp:
ntp_servers: ntp_servers:
- "192.168.10.12" - "192.0.2.23"
password: "secret" password: "secret"
server: "lb.mydomain.com" server: "lb.mydomain.com"
user: "admin" user: "admin"
@ -82,7 +82,7 @@ ntp_servers:
description: The NTP servers that were set on the device description: The NTP servers that were set on the device
returned: changed returned: changed
type: list type: list
sample: ["192.168.10.10", "172.27.10.10"] sample: ["192.0.2.23", "192.0.2.42"]
timezone: timezone:
description: The timezone that was set on the device description: The timezone that was set on the device
returned: changed returned: changed

@ -122,7 +122,7 @@ allow:
system. system.
returned: changed returned: changed
type: list type: list
sample: "192.168.*.*" sample: "192.0.2.*"
banner: banner:
description: Whether the banner is enabled or not. description: Whether the banner is enabled or not.
returned: changed returned: changed

@ -69,7 +69,7 @@ EXAMPLES = '''
- name: Enable virtual server - name: Enable virtual server
local_action: > local_action: >
bigip_gtm_virtual_server bigip_gtm_virtual_server
server=192.168.0.1 server=192.0.2.1
user=admin user=admin
password=mysecret password=mysecret
virtual_server_name=myname virtual_server_name=myname

@ -57,7 +57,7 @@ EXAMPLES = '''
- name: Set lb method - name: Set lb method
local_action: > local_action: >
bigip_gtm_wide_ip bigip_gtm_wide_ip
server=192.168.0.1 server=192.0.2.1
user=admin user=admin
password=mysecret password=mysecret
lb_method=round_robin lb_method=round_robin

@ -170,7 +170,7 @@ address:
description: The address for the Self IP description: The address for the Self IP
returned: created returned: created
type: string type: string
sample: "192.168.10.10" sample: "192.0.2.10"
name: name:
description: The name of the Self IP description: The name of the Self IP
returned: returned:

@ -69,7 +69,7 @@ EXAMPLES = '''
dladm_vnic: name=vnic0 link=bnx0 state=present dladm_vnic: name=vnic0 link=bnx0 state=present
# Create VNIC with specified MAC and VLAN tag over 'aggr0' # Create VNIC with specified MAC and VLAN tag over 'aggr0'
dladm_vnic: name=vnic1 link=aggr0 mac=2:33:af:12:ab:cd vlan=4 dladm_vnic: name=vnic1 link=aggr0 mac=00:00:5E:00:53:23 vlan=4
# Remove 'vnic0' VNIC # Remove 'vnic0' VNIC
dladm_vnic: name=vnic0 link=bnx0 state=absent dladm_vnic: name=vnic0 link=bnx0 state=absent
@ -100,7 +100,7 @@ mac:
description: MAC address to use for VNIC description: MAC address to use for VNIC
returned: if mac is specified returned: if mac is specified
type: string type: string
sample: "00:aa:bc:fe:11:22" sample: "00:00:5E:00:53:42"
vlan: vlan:
description: VLAN to use for VNIC description: VLAN to use for VNIC
returned: success returned: success

@ -73,16 +73,16 @@ options:
required: False required: False
default: None default: None
description: description:
- 'The IPv4 address to this interface using this format ie: "192.168.1.24/24"' - 'The IPv4 address to this interface using this format ie: "192.0.2.24/24"'
gw4: gw4:
required: False required: False
description: description:
- 'The IPv4 gateway for this interface using this format ie: "192.168.100.1"' - 'The IPv4 gateway for this interface using this format ie: "192.0.2.1"'
dns4: dns4:
required: False required: False
default: None default: None
description: description:
- 'A list of upto 3 dns servers, ipv4 format e.g. To add two IPv4 DNS server addresses: ["8.8.8.8 8.8.4.4"]' - 'A list of upto 3 dns servers, ipv4 format e.g. To add two IPv4 DNS server addresses: ["192.0.2.53", "198.51.100.53"]'
ip6: ip6:
required: False required: False
default: None default: None
@ -228,9 +228,9 @@ The following examples are working examples that I have run in the field. I foll
```yml ```yml
--- ---
#devops_os_define_network #devops_os_define_network
storage_gw: "192.168.0.254" storage_gw: "192.0.2.254"
external_gw: "10.10.0.254" external_gw: "198.51.100.254"
tenant_gw: "172.100.0.254" tenant_gw: "203.0.113.254"
#Team vars #Team vars
nmcli_team: nmcli_team:
@ -265,9 +265,9 @@ nmcli_ethernet:
### host_vars ### host_vars
```yml ```yml
--- ---
storage_ip: "192.168.160.21/23" storage_ip: "192.0.2.91/23"
external_ip: "10.10.152.21/21" external_ip: "198.51.100.23/21"
tenant_ip: "192.168.200.21/23" tenant_ip: "203.0.113.77/23"
``` ```
@ -346,16 +346,16 @@ tenant_ip: "192.168.200.21/23"
- { conn_name: 'team-p2p2'} - { conn_name: 'team-p2p2'}
``` ```
# To add an Ethernet connection with static IP configuration, issue a command as follows # To add an Ethernet connection with static IP configuration, issue a command as follows
- nmcli: conn_name=my-eth1 ifname=eth1 type=ethernet ip4=192.168.100.100/24 gw4=192.168.100.1 state=present - nmcli: conn_name=my-eth1 ifname=eth1 type=ethernet ip4=192.0.2.100/24 gw4=192.0.2.1 state=present
# To add an Team connection with static IP configuration, issue a command as follows # To add an Team connection with static IP configuration, issue a command as follows
- nmcli: conn_name=my-team1 ifname=my-team1 type=team ip4=192.168.100.100/24 gw4=192.168.100.1 state=present autoconnect=yes - nmcli: conn_name=my-team1 ifname=my-team1 type=team ip4=192.0.2.100/24 gw4=192.0.2.1 state=present autoconnect=yes
# Optionally, at the same time specify IPv6 addresses for the device as follows: # Optionally, at the same time specify IPv6 addresses for the device as follows:
- nmcli: conn_name=my-eth1 ifname=eth1 type=ethernet ip4=192.168.100.100/24 gw4=192.168.100.1 ip6=abbe::cafe gw6=2001:db8::1 state=present - nmcli: conn_name=my-eth1 ifname=eth1 type=ethernet ip4=192.0.2.100/24 gw4=192.0.2.1 ip6=2001:db8::cafe gw6=2001:db8::1 state=present
# To add two IPv4 DNS server addresses: # To add two IPv4 DNS server addresses:
-nmcli: conn_name=my-eth1 dns4=["8.8.8.8", "8.8.4.4"] state=present -nmcli: conn_name=my-eth1 dns4=["192.0.2.53", "198.51.100.53"] state=present
# To make a profile usable for all compatible Ethernet interfaces, issue a command as follows # To make a profile usable for all compatible Ethernet interfaces, issue a command as follows
- nmcli: ctype=ethernet name=my-eth1 ifname="*" state=present - nmcli: ctype=ethernet name=my-eth1 ifname="*" state=present
@ -806,8 +806,8 @@ class Nmcli(object):
cmd=[self.module.get_bin_path('nmcli', True)] cmd=[self.module.get_bin_path('nmcli', True)]
# format for creating ethernet interface # format for creating ethernet interface
# To add an Ethernet connection with static IP configuration, issue a command as follows # To add an Ethernet connection with static IP configuration, issue a command as follows
# - nmcli: name=add conn_name=my-eth1 ifname=eth1 type=ethernet ip4=192.168.100.100/24 gw4=192.168.100.1 state=present # - nmcli: name=add conn_name=my-eth1 ifname=eth1 type=ethernet ip4=192.0.2.100/24 gw4=192.0.2.1 state=present
# nmcli con add con-name my-eth1 ifname eth1 type ethernet ip4 192.168.100.100/24 gw4 192.168.100.1 # nmcli con add con-name my-eth1 ifname eth1 type ethernet ip4 192.0.2.100/24 gw4 192.0.2.1
cmd.append('con') cmd.append('con')
cmd.append('add') cmd.append('add')
cmd.append('type') cmd.append('type')
@ -843,8 +843,8 @@ class Nmcli(object):
cmd=[self.module.get_bin_path('nmcli', True)] cmd=[self.module.get_bin_path('nmcli', True)]
# format for modifying ethernet interface # format for modifying ethernet interface
# To add an Ethernet connection with static IP configuration, issue a command as follows # To add an Ethernet connection with static IP configuration, issue a command as follows
# - nmcli: name=add conn_name=my-eth1 ifname=eth1 type=ethernet ip4=192.168.100.100/24 gw4=192.168.100.1 state=present # - nmcli: name=add conn_name=my-eth1 ifname=eth1 type=ethernet ip4=192.0.2.100/24 gw4=192.0.2.1 state=present
# nmcli con add con-name my-eth1 ifname eth1 type ethernet ip4 192.168.100.100/24 gw4 192.168.100.1 # nmcli con add con-name my-eth1 ifname eth1 type ethernet ip4 192.0.2.100/24 gw4 192.0.2.1
cmd.append('con') cmd.append('con')
cmd.append('mod') cmd.append('mod')
cmd.append(self.conn_name) cmd.append(self.conn_name)

@ -82,13 +82,13 @@ EXAMPLES = '''
- openvswitch_port: bridge=br-ex port=vlan10 tag=10 state=present - openvswitch_port: bridge=br-ex port=vlan10 tag=10 state=present
set="Interface vlan10 type=internal" set="Interface vlan10 type=internal"
# Assign interface id server1-vifeth6 and mac address 52:54:00:30:6d:11 # Assign interface id server1-vifeth6 and mac address 00:00:5E:00:53:23
# to port vifeth6 and setup port to be managed by a controller. # to port vifeth6 and setup port to be managed by a controller.
- openvswitch_port: bridge=br-int port=vifeth6 state=present - openvswitch_port: bridge=br-int port=vifeth6 state=present
args: args:
external_ids: external_ids:
iface-id: "{{inventory_hostname}}-vifeth6" iface-id: "{{inventory_hostname}}-vifeth6"
attached-mac: "52:54:00:30:6d:11" attached-mac: "00:00:5E:00:53:23"
vm-id: "{{inventory_hostname}}" vm-id: "{{inventory_hostname}}"
iface-status: "active" iface-status: "active"
''' '''

@ -53,10 +53,10 @@ notes:
''' '''
EXAMPLES = ''' EXAMPLES = '''
# Send a magic Wake-on-LAN packet to 00:CA:FE:BA:BE:00 # Send a magic Wake-on-LAN packet to 00:00:5E:00:53:66
- local_action: wakeonlan mac=00:CA:FE:BA:BE:00 broadcast=192.168.1.255 - local_action: wakeonlan mac=00:00:5E:00:53:66 broadcast=192.0.2.23
- wakeonlan: mac=00:CA:FE:BA:BE:00 port=9 - wakeonlan: mac=00:00:5E:00:53:66 port=9
delegate_to: localhost delegate_to: localhost
''' '''

@ -99,7 +99,7 @@ EXAMPLES = '''
- firewalld: port=161-162/udp permanent=true state=enabled - firewalld: port=161-162/udp permanent=true state=enabled
- firewalld: zone=dmz service=http permanent=true state=enabled - firewalld: zone=dmz service=http permanent=true state=enabled
- firewalld: rich_rule='rule service name="ftp" audit limit value="1/m" accept' permanent=true state=enabled - firewalld: rich_rule='rule service name="ftp" audit limit value="1/m" accept' permanent=true state=enabled
- firewalld: source='192.168.1.0/24' zone=internal state=enabled - firewalld: source='192.0.2.0/24' zone=internal state=enabled
- firewalld: zone=trusted interface=eth2 permanent=true state=enabled - firewalld: zone=trusted interface=eth2 permanent=true state=enabled
- firewalld: masquerade=yes state=enabled permanent=true zone=dmz - firewalld: masquerade=yes state=enabled permanent=true zone=dmz
''' '''

@ -121,7 +121,7 @@ author: "Taneli Leppä (@rosmo)"
EXAMPLES = """ EXAMPLES = """
- name: create gluster volume - name: create gluster volume
gluster_volume: state=present name=test1 bricks=/bricks/brick1/g1 rebalance=yes cluster="192.168.1.10,192.168.1.11" gluster_volume: state=present name=test1 bricks=/bricks/brick1/g1 rebalance=yes cluster="192.0.2.10,192.0.2.11"
run_once: true run_once: true
- name: tune - name: tune
@ -140,7 +140,7 @@ EXAMPLES = """
gluster_volume: state=absent name=test1 gluster_volume: state=absent name=test1
- name: create gluster volume with multiple bricks - name: create gluster volume with multiple bricks
gluster_volume: state=present name=test2 bricks="/bricks/brick1/g2,/bricks/brick2/g2" cluster="192.168.1.10,192.168.1.11" gluster_volume: state=present name=test2 bricks="/bricks/brick1/g2,/bricks/brick2/g2" cluster="192.0.2.10,192.0.2.11"
run_once: true run_once: true
""" """

@ -74,7 +74,7 @@ options:
required: false required: false
default: [] default: []
description: description:
- "Additional data for this record, e.g. ['a': '192.168.1.1']. - "Additional data for this record, e.g. ['a': '192.0.2.1'].
Required if C(state=present)." Required if C(state=present)."
''' '''
@ -84,7 +84,7 @@ EXAMPLES = '''
- udm_dns_zone: name=www - udm_dns_zone: name=www
zone=example.com zone=example.com
type=host_record type=host_record
data=['a': '192.168.1.1'] data=['a': '192.0.2.1']
''' '''

@ -106,7 +106,7 @@ EXAMPLES = '''
- udm_dns_zone: zone=example.com - udm_dns_zone: zone=example.com
type=forward_zone type=forward_zone
nameserver=['ucs.example.com'] nameserver=['ucs.example.com']
interfaces=['192.168.1.1'] interfaces=['192.0.2.1']
''' '''

Loading…
Cancel
Save