Some more code-block fixes

pull/20008/head
Toshio Kuratomi 8 years ago
parent 7df31aaca1
commit adb7426c0c

@ -174,11 +174,12 @@ To see what information is available, try the following::
This will return a ginormous amount of variable data, which may look like this, as taken from Ansible 1.4 on a Ubuntu 12.04 system This will return a ginormous amount of variable data, which may look like this, as taken from Ansible 1.4 on a Ubuntu 12.04 system
.. code-block: none .. code-block: json
{
"ansible_all_ipv4_addresses": [ "ansible_all_ipv4_addresses": [
"REDACTED IP ADDRESS" "REDACTED IP ADDRESS"
], ],
"ansible_all_ipv6_addresses": [ "ansible_all_ipv6_addresses": [
"REDACTED IPV6 ADDRESS" "REDACTED IPV6 ADDRESS"
], ],
@ -205,7 +206,7 @@ This will return a ginormous amount of variable data, which may look like this,
"time": "19:33:30", "time": "19:33:30",
"tz": "EDT", "tz": "EDT",
"year": "2013" "year": "2013"
}, },
"ansible_default_ipv4": { "ansible_default_ipv4": {
"address": "REDACTED", "address": "REDACTED",
"alias": "eth0", "alias": "eth0",
@ -216,194 +217,195 @@ This will return a ginormous amount of variable data, which may look like this,
"netmask": "255.255.255.0", "netmask": "255.255.255.0",
"network": "REDACTED", "network": "REDACTED",
"type": "ether" "type": "ether"
}, },
"ansible_default_ipv6": {}, "ansible_default_ipv6": {},
"ansible_devices": { "ansible_devices": {
"fd0": { "fd0": {
"holders": [], "holders": [],
"host": "", "host": "",
"model": null, "model": null,
"partitions": {}, "partitions": {},
"removable": "1", "removable": "1",
"rotational": "1", "rotational": "1",
"scheduler_mode": "deadline", "scheduler_mode": "deadline",
"sectors": "0", "sectors": "0",
"sectorsize": "512", "sectorsize": "512",
"size": "0.00 Bytes", "size": "0.00 Bytes",
"support_discard": "0", "support_discard": "0",
"vendor": null "vendor": null
}, },
"sda": { "sda": {
"holders": [], "holders": [],
"host": "SCSI storage controller: LSI Logic / Symbios Logic 53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI (rev 01)", "host": "SCSI storage controller: LSI Logic / Symbios Logic 53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI (rev 01)",
"model": "VMware Virtual S", "model": "VMware Virtual S",
"partitions": { "partitions": {
"sda1": { "sda1": {
"sectors": "39843840", "sectors": "39843840",
"sectorsize": 512, "sectorsize": 512,
"size": "19.00 GB", "size": "19.00 GB",
"start": "2048" "start": "2048"
}, },
"sda2": { "sda2": {
"sectors": "2", "sectors": "2",
"sectorsize": 512, "sectorsize": 512,
"size": "1.00 KB", "size": "1.00 KB",
"start": "39847934" "start": "39847934"
}, },
"sda5": { "sda5": {
"sectors": "2093056", "sectors": "2093056",
"sectorsize": 512, "sectorsize": 512,
"size": "1022.00 MB", "size": "1022.00 MB",
"start": "39847936" "start": "39847936"
} }
}, },
"removable": "0", "removable": "0",
"rotational": "1", "rotational": "1",
"scheduler_mode": "deadline", "scheduler_mode": "deadline",
"sectors": "41943040", "sectors": "41943040",
"sectorsize": "512", "sectorsize": "512",
"size": "20.00 GB", "size": "20.00 GB",
"support_discard": "0", "support_discard": "0",
"vendor": "VMware," "vendor": "VMware,"
}, },
"sr0": { "sr0": {
"holders": [], "holders": [],
"host": "IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)", "host": "IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)",
"model": "VMware IDE CDR10", "model": "VMware IDE CDR10",
"partitions": {}, "partitions": {},
"removable": "1", "removable": "1",
"rotational": "1", "rotational": "1",
"scheduler_mode": "deadline", "scheduler_mode": "deadline",
"sectors": "2097151", "sectors": "2097151",
"sectorsize": "512", "sectorsize": "512",
"size": "1024.00 MB", "size": "1024.00 MB",
"support_discard": "0", "support_discard": "0",
"vendor": "NECVMWar" "vendor": "NECVMWar"
} }
}, },
"ansible_distribution": "Ubuntu", "ansible_distribution": "Ubuntu",
"ansible_distribution_release": "precise", "ansible_distribution_release": "precise",
"ansible_distribution_version": "12.04", "ansible_distribution_version": "12.04",
"ansible_domain": "", "ansible_domain": "",
"ansible_env": { "ansible_env": {
"COLORTERM": "gnome-terminal", "COLORTERM": "gnome-terminal",
"DISPLAY": ":0", "DISPLAY": ":0",
"HOME": "/home/mdehaan", "HOME": "/home/mdehaan",
"LANG": "C", "LANG": "C",
"LESSCLOSE": "/usr/bin/lesspipe %s %s", "LESSCLOSE": "/usr/bin/lesspipe %s %s",
"LESSOPEN": "| /usr/bin/lesspipe %s", "LESSOPEN": "| /usr/bin/lesspipe %s",
"LOGNAME": "root", "LOGNAME": "root",
"LS_COLORS": "rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:", "LS_COLORS": "rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:",
"MAIL": "/var/mail/root", "MAIL": "/var/mail/root",
"OLDPWD": "/root/ansible/docsite", "OLDPWD": "/root/ansible/docsite",
"PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"PWD": "/root/ansible", "PWD": "/root/ansible",
"SHELL": "/bin/bash", "SHELL": "/bin/bash",
"SHLVL": "1", "SHLVL": "1",
"SUDO_COMMAND": "/bin/bash", "SUDO_COMMAND": "/bin/bash",
"SUDO_GID": "1000", "SUDO_GID": "1000",
"SUDO_UID": "1000", "SUDO_UID": "1000",
"SUDO_USER": "mdehaan", "SUDO_USER": "mdehaan",
"TERM": "xterm", "TERM": "xterm",
"USER": "root", "USER": "root",
"USERNAME": "root", "USERNAME": "root",
"XAUTHORITY": "/home/mdehaan/.Xauthority", "XAUTHORITY": "/home/mdehaan/.Xauthority",
"_": "/usr/local/bin/ansible" "_": "/usr/local/bin/ansible"
}, },
"ansible_eth0": { "ansible_eth0": {
"active": true, "active": true,
"device": "eth0", "device": "eth0",
"ipv4": { "ipv4": {
"address": "REDACTED", "address": "REDACTED",
"netmask": "255.255.255.0", "netmask": "255.255.255.0",
"network": "REDACTED" "network": "REDACTED"
}, },
"ipv6": [ "ipv6": [
{ {
"address": "REDACTED", "address": "REDACTED",
"prefix": "64", "prefix": "64",
"scope": "link" "scope": "link"
} }
], ],
"macaddress": "REDACTED", "macaddress": "REDACTED",
"module": "e1000", "module": "e1000",
"mtu": 1500, "mtu": 1500,
"type": "ether" "type": "ether"
}, },
"ansible_form_factor": "Other", "ansible_form_factor": "Other",
"ansible_fqdn": "ubuntu2.example.com", "ansible_fqdn": "ubuntu2.example.com",
"ansible_hostname": "ubuntu2", "ansible_hostname": "ubuntu2",
"ansible_interfaces": [ "ansible_interfaces": [
"lo", "lo",
"eth0" "eth0"
], ],
"ansible_kernel": "3.5.0-23-generic", "ansible_kernel": "3.5.0-23-generic",
"ansible_lo": { "ansible_lo": {
"active": true, "active": true,
"device": "lo", "device": "lo",
"ipv4": { "ipv4": {
"address": "127.0.0.1", "address": "127.0.0.1",
"netmask": "255.0.0.0", "netmask": "255.0.0.0",
"network": "127.0.0.0" "network": "127.0.0.0"
}, },
"ipv6": [ "ipv6": [
{ {
"address": "::1", "address": "::1",
"prefix": "128", "prefix": "128",
"scope": "host" "scope": "host"
} }
], ],
"mtu": 16436, "mtu": 16436,
"type": "loopback" "type": "loopback"
}, },
"ansible_lsb": { "ansible_lsb": {
"codename": "precise", "codename": "precise",
"description": "Ubuntu 12.04.2 LTS", "description": "Ubuntu 12.04.2 LTS",
"id": "Ubuntu", "id": "Ubuntu",
"major_release": "12", "major_release": "12",
"release": "12.04" "release": "12.04"
}, },
"ansible_machine": "x86_64", "ansible_machine": "x86_64",
"ansible_memfree_mb": 74, "ansible_memfree_mb": 74,
"ansible_memtotal_mb": 991, "ansible_memtotal_mb": 991,
"ansible_mounts": [ "ansible_mounts": [
{ {
"device": "/dev/sda1", "device": "/dev/sda1",
"fstype": "ext4", "fstype": "ext4",
"mount": "/", "mount": "/",
"options": "rw,errors=remount-ro", "options": "rw,errors=remount-ro",
"size_available": 15032406016, "size_available": 15032406016,
"size_total": 20079898624 "size_total": 20079898624
} }
], ],
"ansible_nodename": "ubuntu2.example.com", "ansible_nodename": "ubuntu2.example.com",
"ansible_os_family": "Debian", "ansible_os_family": "Debian",
"ansible_pkg_mgr": "apt", "ansible_pkg_mgr": "apt",
"ansible_processor": [ "ansible_processor": [
"Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz" "Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz"
], ],
"ansible_processor_cores": 1, "ansible_processor_cores": 1,
"ansible_processor_count": 1, "ansible_processor_count": 1,
"ansible_processor_threads_per_core": 1, "ansible_processor_threads_per_core": 1,
"ansible_processor_vcpus": 1, "ansible_processor_vcpus": 1,
"ansible_product_name": "VMware Virtual Platform", "ansible_product_name": "VMware Virtual Platform",
"ansible_product_serial": "REDACTED", "ansible_product_serial": "REDACTED",
"ansible_product_uuid": "REDACTED", "ansible_product_uuid": "REDACTED",
"ansible_product_version": "None", "ansible_product_version": "None",
"ansible_python_version": "2.7.3", "ansible_python_version": "2.7.3",
"ansible_selinux": false, "ansible_selinux": false,
"ansible_ssh_host_key_dsa_public": "REDACTED KEY VALUE" "ansible_ssh_host_key_dsa_public": "REDACTED KEY VALUE",
"ansible_ssh_host_key_ecdsa_public": "REDACTED KEY VALUE" "ansible_ssh_host_key_ecdsa_public": "REDACTED KEY VALUE",
"ansible_ssh_host_key_rsa_public": "REDACTED KEY VALUE" "ansible_ssh_host_key_rsa_public": "REDACTED KEY VALUE",
"ansible_swapfree_mb": 665, "ansible_swapfree_mb": 665,
"ansible_swaptotal_mb": 1021, "ansible_swaptotal_mb": 1021,
"ansible_system": "Linux", "ansible_system": "Linux",
"ansible_system_vendor": "VMware, Inc.", "ansible_system_vendor": "VMware, Inc.",
"ansible_user_id": "root", "ansible_user_id": "root",
"ansible_userspace_architecture": "x86_64", "ansible_userspace_architecture": "x86_64",
"ansible_userspace_bits": "64", "ansible_userspace_bits": "64",
"ansible_virtualization_role": "guest", "ansible_virtualization_role": "guest",
"ansible_virtualization_type": "VMware" "ansible_virtualization_type": "VMware"
}
In the above the model of the first harddrive may be referenced in a template or playbook as:: In the above the model of the first harddrive may be referenced in a template or playbook as::
@ -658,7 +660,7 @@ Additionally, ``group_names`` is a list (array) of all the groups the current ho
``groups`` is a list of all the groups (and hosts) in the inventory. This can be used to enumerate all hosts within a group. ``groups`` is a list of all the groups (and hosts) in the inventory. This can be used to enumerate all hosts within a group.
For example For example:
.. code-block:: jinja .. code-block:: jinja

@ -232,7 +232,7 @@ Although Ansible 2.0 provides a new callback API the old one continues to work
for most callback plugins. However, if your callback plugin makes use of for most callback plugins. However, if your callback plugin makes use of
:attr:`self.playbook`, :attr:`self.play`, or :attr:`self.task` then you will :attr:`self.playbook`, :attr:`self.play`, or :attr:`self.task` then you will
have to store the values for these yourself as ansible no longer automatically have to store the values for these yourself as ansible no longer automatically
populates the callback with them. Here's a short snippet that shows you how populates the callback with them. Here's a short snippet that shows you how:
.. code-block:: python .. code-block:: python

Loading…
Cancel
Save