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
This commit is contained in:
Robin Schneider 2016-09-12 11:27:45 +02:00 committed by René Moser
parent 061c6517eb
commit 67a1bebbd3
30 changed files with 77 additions and 77 deletions

View file

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

View file

@ -29,7 +29,7 @@ options:
default: null
cidr:
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
default: null
tags:

View file

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

View file

@ -263,7 +263,7 @@ EXAMPLES = '''
service_offering: Tiny
ip_to_networks:
- {'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
- local_action: cs_instance name=web-vm-1 state=stopped

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -108,8 +108,8 @@ EXAMPLES = '''
# Get master binlog file name and binlog position
- mysql_replication: mode=getmaster
# Change master to master server 192.168.1.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
# 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.0.2.1 master_log_file=mysql-bin.000009 master_log_pos=4578
# Check slave status using port 3308
- mysql_replication: mode=getslave login_host=ansible.example.com login_port=3308

View file

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

View file

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

View file

@ -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"
# 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
- dnsmadeeasy: account_key=key account_secret=secret domain=my.com state=present record_name="test"

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -69,7 +69,7 @@ EXAMPLES = '''
dladm_vnic: name=vnic0 link=bnx0 state=present
# 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
dladm_vnic: name=vnic0 link=bnx0 state=absent
@ -100,7 +100,7 @@ mac:
description: MAC address to use for VNIC
returned: if mac is specified
type: string
sample: "00:aa:bc:fe:11:22"
sample: "00:00:5E:00:53:42"
vlan:
description: VLAN to use for VNIC
returned: success

View file

@ -73,16 +73,16 @@ options:
required: False
default: None
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:
required: False
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:
required: False
default: None
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:
required: False
default: None
@ -228,9 +228,9 @@ The following examples are working examples that I have run in the field. I foll
```yml
---
#devops_os_define_network
storage_gw: "192.168.0.254"
external_gw: "10.10.0.254"
tenant_gw: "172.100.0.254"
storage_gw: "192.0.2.254"
external_gw: "198.51.100.254"
tenant_gw: "203.0.113.254"
#Team vars
nmcli_team:
@ -265,9 +265,9 @@ nmcli_ethernet:
### host_vars
```yml
---
storage_ip: "192.168.160.21/23"
external_ip: "10.10.152.21/21"
tenant_ip: "192.168.200.21/23"
storage_ip: "192.0.2.91/23"
external_ip: "198.51.100.23/21"
tenant_ip: "203.0.113.77/23"
```
@ -346,16 +346,16 @@ tenant_ip: "192.168.200.21/23"
- { conn_name: 'team-p2p2'}
```
# 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
- 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:
- 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:
-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
- nmcli: ctype=ethernet name=my-eth1 ifname="*" state=present
@ -806,8 +806,8 @@ class Nmcli(object):
cmd=[self.module.get_bin_path('nmcli', True)]
# format for creating ethernet interface
# 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 con add con-name my-eth1 ifname eth1 type ethernet ip4 192.168.100.100/24 gw4 192.168.100.1
# - 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.0.2.100/24 gw4 192.0.2.1
cmd.append('con')
cmd.append('add')
cmd.append('type')
@ -843,8 +843,8 @@ class Nmcli(object):
cmd=[self.module.get_bin_path('nmcli', True)]
# format for modifying ethernet interface
# 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 con add con-name my-eth1 ifname eth1 type ethernet ip4 192.168.100.100/24 gw4 192.168.100.1
# - 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.0.2.100/24 gw4 192.0.2.1
cmd.append('con')
cmd.append('mod')
cmd.append(self.conn_name)

View file

@ -82,13 +82,13 @@ EXAMPLES = '''
- openvswitch_port: bridge=br-ex port=vlan10 tag=10 state=present
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.
- openvswitch_port: bridge=br-int port=vifeth6 state=present
args:
external_ids:
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}}"
iface-status: "active"
'''

View file

@ -53,10 +53,10 @@ notes:
'''
EXAMPLES = '''
# Send a magic Wake-on-LAN packet to 00:CA:FE:BA:BE:00
- local_action: wakeonlan mac=00:CA:FE:BA:BE:00 broadcast=192.168.1.255
# Send a magic Wake-on-LAN packet to 00:00:5E:00:53:66
- 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
'''
@ -123,4 +123,4 @@ def main():
if __name__ == '__main__':
main()
main()

View file

@ -99,7 +99,7 @@ EXAMPLES = '''
- firewalld: port=161-162/udp 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: 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: masquerade=yes state=enabled permanent=true zone=dmz
'''

View file

@ -121,7 +121,7 @@ author: "Taneli Leppä (@rosmo)"
EXAMPLES = """
- 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
- name: tune
@ -140,7 +140,7 @@ EXAMPLES = """
gluster_volume: state=absent name=test1
- 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
"""

View file

@ -74,7 +74,7 @@ options:
required: false
default: []
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)."
'''
@ -84,7 +84,7 @@ EXAMPLES = '''
- udm_dns_zone: name=www
zone=example.com
type=host_record
data=['a': '192.168.1.1']
data=['a': '192.0.2.1']
'''

View file

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