facts 変数

2019/03/10

Ansible

 Ansible Documentation

Variables discovered from systems: Facts

 説明

  • 対象ホストの情報(ホスト名などの設定値や OS のバージョン、ハードウェア情報 等)が格納された変数
  •  Ansible が用意している変数であり、 vars セクションで定義する必要はない
  •  facts 変数が不要の場合、 targets セクションで “gather_facts: no” を記述する

 確認方法

  • ansible <host-pattern> -i <inventory file> -m setup

 定義されている変数

facts 変数設定される値
 ansible_hostname ホスト名
 ansible_os_family  OS の系列(RedHat系なら“RedHat”)
 ansible_distribution  OS のディストリビューション
 ansible_distribution_major_version  OS のメジャーバージョン
 ansible_distribution_version  OS のバージョン

 参照方法

 facts 変数は次の 3 とおりの方法で参照できます。
  • ansible_os_family
  • ansible_facts.os_family
  • ansible_facts['os_family']
 facts 変数の階層が深い場合の例です。
  • ansible_default_ipv4.address
  • ansible_facts.default_ipv4.address
  • ansible_facts['default_ipv4']['address']
 play 内で使用するのは facts 変数であることを明示できる ansible_facts.・・・ か ansible_facts['・・・'] を使用するのが適していると思います。

 どんなときに使用するのか

  •  OS の系統やディストリビューションで処理の使い分けが必要なとき
  • 例: yum と apt の使い分けが必要なとき
  • ホスト名や OS のバージョンで処理を分けたいとき      等々

 例

■ inventory ファイル : hosts.yml
all:
  hosts:
    node1: 

■ 対象ホスト : node1 のすべての facts 変数
[ansibleman@ansiblesv ansible]$ ansible all -i hosts.yml -m setup
node1 | SUCCESS => {
    "ansible_facts": {
        "ansible_all_ipv4_addresses": [
            "192.168.101.11"
        ], 
        "ansible_all_ipv6_addresses": [
            "fe80::df7e:706:ca14:4df1"
        ], 
        "ansible_apparmor": {
            "status": "disabled"
        }, 
        "ansible_architecture": "x86_64", 
        "ansible_bios_date": "07/03/2018", 
        "ansible_bios_version": "6.00", 
        "ansible_cmdline": {
            "BOOT_IMAGE": "/vmlinuz-3.10.0-957.el7.x86_64", 
            "LANG": "en_US.UTF-8", 
            "quiet": true, 
            "rd.lvm.lv": "centos_node1/swap", 
            "rhgb": true, 
            "ro": true, 
            "root": "/dev/mapper/centos_node1-root"
        }, 
        "ansible_date_time": {
            "date": "2019-03-10", 
            "day": "10", 
            "epoch": "1552202405", 
            "hour": "16", 
            "iso8601": "2019-03-10T07:20:05Z", 
            "iso8601_basic": "20190310T162005927394", 
            "iso8601_basic_short": "20190310T162005", 
            "iso8601_micro": "2019-03-10T07:20:05.927590Z", 
            "minute": "20", 
            "month": "03", 
            "second": "05", 
            "time": "16:20:05", 
            "tz": "JST", 
            "tz_offset": "+0900", 
            "weekday": "Sunday", 
            "weekday_number": "0", 
            "weeknumber": "09", 
            "year": "2019"
        }, 
        "ansible_default_ipv4": {
            "address": "192.168.101.11", 
            "alias": "ens192", 
            "broadcast": "192.168.101.255", 
            "gateway": "192.168.101.254", 
            "interface": "ens192", 
            "macaddress": "00:50:56:00:00:11", 
            "mtu": 1500, 
            "netmask": "255.255.255.0", 
            "network": "192.168.101.0", 
            "type": "ether"
        }, 
        "ansible_default_ipv6": {}, 
        "ansible_device_links": {
            "ids": {
                "dm-0": [
                    "dm-name-centos_node1-root", 
                    "dm-uuid-LVM-izn1mSJEmKQoIcGpwwfY8IpXJ4mE5rLBTDAFkmCOPxKe4mSCnM8Fdg3cdHtVLo09"
                ], 
                "dm-1": [
                    "dm-name-centos_node1-swap", 
                    "dm-uuid-LVM-izn1mSJEmKQoIcGpwwfY8IpXJ4mE5rLB1a0lewQL9hNPPEUt2bH1jU2GY9yA4NQt"
                ], 
                "sda2": [
                    "lvm-pv-uuid-OUrSCl-M9I1-d9UO-96FY-qUwL-OmqT-3a2mTd"
                ], 
                "sr0": [
                    "ata-VMware_Virtual_SATA_CDRW_Drive_00000000000000000001"
                ]
            }, 
            "labels": {
                "sr0": [
                    "CentOS\\x207\\x20x86_64"
                ]
            }, 
            "masters": {
                "sda2": [
                    "dm-0", 
                    "dm-1"
                ]
            }, 
            "uuids": {
                "dm-0": [
                    "d901feb5-f17b-4485-966b-0a859c952cf1"
                ], 
                "dm-1": [
                    "31458f05-9502-4b8a-b008-13a5af6c45d2"
                ], 
                "sda1": [
                    "9e9a7038-41d5-4a7b-b83f-ab58802ea273"
                ], 
                "sr0": [
                    "2018-11-25-21-21-31-00"
                ]
            }
        }, 
        "ansible_devices": {
            "dm-0": {
                "holders": [], 
                "host": "", 
                "links": {
                    "ids": [
                        "dm-name-centos_node1-root", 
                        "dm-uuid-LVM-izn1mSJEmKQoIcGpwwfY8IpXJ4mE5rLBTDAFkmCOPxKe4mSCnM8Fdg3cdHtVLo09"
                    ], 
                    "labels": [], 
                    "masters": [], 
                    "uuids": [
                        "d901feb5-f17b-4485-966b-0a859c952cf1"
                    ]
                }, 
                "model": null, 
                "partitions": {}, 
                "removable": "0", 
                "rotational": "1", 
                "sas_address": null, 
                "sas_device_handle": null, 
                "scheduler_mode": "", 
                "sectors": "58286080", 
                "sectorsize": "512", 
                "size": "27.79 GB", 
                "support_discard": "512", 
                "vendor": null, 
                "virtual": 1
            }, 
            "dm-1": {
                "holders": [], 
                "host": "", 
                "links": {
                    "ids": [
                        "dm-name-centos_node1-swap", 
                        "dm-uuid-LVM-izn1mSJEmKQoIcGpwwfY8IpXJ4mE5rLB1a0lewQL9hNPPEUt2bH1jU2GY9yA4NQt"
                    ], 
                    "labels": [], 
                    "masters": [], 
                    "uuids": [
                        "31458f05-9502-4b8a-b008-13a5af6c45d2"
                    ]
                }, 
                "model": null, 
                "partitions": {}, 
                "removable": "0", 
                "rotational": "1", 
                "sas_address": null, 
                "sas_device_handle": null, 
                "scheduler_mode": "", 
                "sectors": "6709248", 
                "sectorsize": "512", 
                "size": "3.20 GB", 
                "support_discard": "512", 
                "vendor": null, 
                "virtual": 1
            }, 
            "sda": {
                "holders": [], 
                "host": "", 
                "links": {
                    "ids": [], 
                    "labels": [], 
                    "masters": [], 
                    "uuids": []
                }, 
                "model": "Virtual disk", 
                "partitions": {
                    "sda1": {
                        "holders": [], 
                        "links": {
                            "ids": [], 
                            "labels": [], 
                            "masters": [], 
                            "uuids": [
                                "9e9a7038-41d5-4a7b-b83f-ab58802ea273"
                            ]
                        }, 
                        "sectors": "2097152", 
                        "sectorsize": 512, 
                        "size": "1.00 GB", 
                        "start": "2048", 
                        "uuid": "9e9a7038-41d5-4a7b-b83f-ab58802ea273"
                    }, 
                    "sda2": {
                        "holders": [
                            "centos_node1-root", 
                            "centos_node1-swap"
                        ], 
                        "links": {
                            "ids": [
                                "lvm-pv-uuid-OUrSCl-M9I1-d9UO-96FY-qUwL-OmqT-3a2mTd"
                            ], 
                            "labels": [], 
                            "masters": [
                                "dm-0", 
                                "dm-1"
                            ], 
                            "uuids": []
                        }, 
                        "sectors": "65009664", 
                        "sectorsize": 512, 
                        "size": "31.00 GB", 
                        "start": "2099200", 
                        "uuid": null
                    }
                }, 
                "removable": "0", 
                "rotational": "1", 
                "sas_address": null, 
                "sas_device_handle": null, 
                "scheduler_mode": "deadline", 
                "sectors": "67108864", 
                "sectorsize": "512", 
                "size": "32.00 GB", 
                "support_discard": "512", 
                "vendor": "VMware", 
                "virtual": 1
            }, 
            "sr0": {
                "holders": [], 
                "host": "", 
                "links": {
                    "ids": [
                        "ata-VMware_Virtual_SATA_CDRW_Drive_00000000000000000001"
                    ], 
                    "labels": [
                        "CentOS\\x207\\x20x86_64"
                    ], 
                    "masters": [], 
                    "uuids": [
                        "2018-11-25-21-21-31-00"
                    ]
                }, 
                "model": "VMware SATA CD00", 
                "partitions": {}, 
                "removable": "1", 
                "rotational": "1", 
                "sas_address": null, 
                "sas_device_handle": null, 
                "scheduler_mode": "deadline", 
                "sectors": "1880064", 
                "sectorsize": "2048", 
                "size": "918.00 MB", 
                "support_discard": "0", 
                "vendor": "NECVMWar", 
                "virtual": 1
            }
        }, 
        "ansible_distribution": "CentOS", 
        "ansible_distribution_file_parsed": true, 
        "ansible_distribution_file_path": "/etc/redhat-release", 
        "ansible_distribution_file_variety": "RedHat", 
        "ansible_distribution_major_version": "7", 
        "ansible_distribution_release": "Core", 
        "ansible_distribution_version": "7.6.1810", 
        "ansible_dns": {
            "nameservers": [
                "192.168.101.254"
            ], 
            "search": [
                "exam.local"
            ]
        }, 
        "ansible_domain": "exam.local", 
        "ansible_effective_group_id": 0, 
        "ansible_effective_user_id": 0, 
        "ansible_ens192": {
            "active": true, 
            "device": "ens192", 
            "features": {
                "busy_poll": "off [fixed]", 
                "fcoe_mtu": "off [fixed]", 
                "generic_receive_offload": "on", 
                "generic_segmentation_offload": "on", 
                "highdma": "on", 
                "hw_tc_offload": "off [fixed]", 
                "l2_fwd_offload": "off [fixed]", 
                "large_receive_offload": "on", 
                "loopback": "off [fixed]", 
                "netns_local": "off [fixed]", 
                "ntuple_filters": "off [fixed]", 
                "receive_hashing": "off [fixed]", 
                "rx_all": "off [fixed]", 
                "rx_checksumming": "on", 
                "rx_fcs": "off [fixed]", 
                "rx_gro_hw": "off [fixed]", 
                "rx_udp_tunnel_port_offload": "off [fixed]", 
                "rx_vlan_filter": "on [fixed]", 
                "rx_vlan_offload": "on", 
                "rx_vlan_stag_filter": "off [fixed]", 
                "rx_vlan_stag_hw_parse": "off [fixed]", 
                "scatter_gather": "on", 
                "tcp_segmentation_offload": "on", 
                "tx_checksum_fcoe_crc": "off [fixed]", 
                "tx_checksum_ip_generic": "on", 
                "tx_checksum_ipv4": "off [fixed]", 
                "tx_checksum_ipv6": "off [fixed]", 
                "tx_checksum_sctp": "off [fixed]", 
                "tx_checksumming": "on", 
                "tx_fcoe_segmentation": "off [fixed]", 
                "tx_gre_csum_segmentation": "off [fixed]", 
                "tx_gre_segmentation": "off [fixed]", 
                "tx_gso_partial": "off [fixed]", 
                "tx_gso_robust": "off [fixed]", 
                "tx_ipip_segmentation": "off [fixed]", 
                "tx_lockless": "off [fixed]", 
                "tx_nocache_copy": "off", 
                "tx_scatter_gather": "on", 
                "tx_scatter_gather_fraglist": "off [fixed]", 
                "tx_sctp_segmentation": "off [fixed]", 
                "tx_sit_segmentation": "off [fixed]", 
                "tx_tcp6_segmentation": "on", 
                "tx_tcp_ecn_segmentation": "off [fixed]", 
                "tx_tcp_mangleid_segmentation": "off", 
                "tx_tcp_segmentation": "on", 
                "tx_udp_tnl_csum_segmentation": "off [fixed]", 
                "tx_udp_tnl_segmentation": "off [fixed]", 
                "tx_vlan_offload": "on", 
                "tx_vlan_stag_hw_insert": "off [fixed]", 
                "udp_fragmentation_offload": "off [fixed]", 
                "vlan_challenged": "off [fixed]"
            }, 
            "hw_timestamp_filters": [], 
            "ipv4": {
                "address": "192.168.101.11", 
                "broadcast": "192.168.101.255", 
                "netmask": "255.255.255.0", 
                "network": "192.168.101.0"
            }, 
            "ipv6": [
                {
                    "address": "fe80::df7e:706:ca14:4df1", 
                    "prefix": "64", 
                    "scope": "link"
                }
            ], 
            "macaddress": "00:50:56:00:00:11", 
            "module": "vmxnet3", 
            "mtu": 1500, 
            "pciid": "0000:0b:00.0", 
            "promisc": false, 
            "speed": 10000, 
            "timestamping": [
                "rx_software", 
                "software"
            ], 
            "type": "ether"
        }, 
        "ansible_env": {
            "HOME": "/root", 
            "LANG": "en_US.UTF-8", 
            "LESSOPEN": "||/usr/bin/lesspipe.sh %s", 
            "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:mi=01;05;37;41: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:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=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:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=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=01;36:*.au=01;36:*.flac=01;36:*.mid=01;36:*.midi=01;36:*.mka=01;36:*.mp3=01;36:*.mpc=01;36:*.ogg=01;36:*.ra=01;36:*.wav=01;36:*.axa=01;36:*.oga=01;36:*.spx=01;36:*.xspf=01;36:", 
            "MAIL": "/var/mail/root", 
            "PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin", 
            "PWD": "/root", 
            "SELINUX_LEVEL_REQUESTED": "", 
            "SELINUX_ROLE_REQUESTED": "", 
            "SELINUX_USE_CURRENT_RANGE": "", 
            "SHELL": "/bin/bash", 
            "SHLVL": "2", 
            "SSH_CLIENT": "192.168.101.1 47648 22", 
            "SSH_CONNECTION": "192.168.101.1 47648 192.168.101.11 22", 
            "SSH_TTY": "/dev/pts/0", 
            "TERM": "xterm", 
            "USER": "root", 
            "XDG_RUNTIME_DIR": "/run/user/0", 
            "XDG_SESSION_ID": "20", 
            "_": "/usr/bin/python"
        }, 
        "ansible_fips": false, 
        "ansible_form_factor": "Other", 
        "ansible_fqdn": "node1.exam.local", 
        "ansible_hostname": "node1", 
        "ansible_interfaces": [
            "lo", 
            "ens192"
        ], 
        "ansible_is_chroot": false, 
        "ansible_iscsi_iqn": "", 
        "ansible_kernel": "3.10.0-957.el7.x86_64", 
        "ansible_lo": {
            "active": true, 
            "device": "lo", 
            "features": {
                "busy_poll": "off [fixed]", 
                "fcoe_mtu": "off [fixed]", 
                "generic_receive_offload": "on", 
                "generic_segmentation_offload": "on", 
                "highdma": "on [fixed]", 
                "hw_tc_offload": "off [fixed]", 
                "l2_fwd_offload": "off [fixed]", 
                "large_receive_offload": "off [fixed]", 
                "loopback": "on [fixed]", 
                "netns_local": "on [fixed]", 
                "ntuple_filters": "off [fixed]", 
                "receive_hashing": "off [fixed]", 
                "rx_all": "off [fixed]", 
                "rx_checksumming": "on [fixed]", 
                "rx_fcs": "off [fixed]", 
                "rx_gro_hw": "off [fixed]", 
                "rx_udp_tunnel_port_offload": "off [fixed]", 
                "rx_vlan_filter": "off [fixed]", 
                "rx_vlan_offload": "off [fixed]", 
                "rx_vlan_stag_filter": "off [fixed]", 
                "rx_vlan_stag_hw_parse": "off [fixed]", 
                "scatter_gather": "on", 
                "tcp_segmentation_offload": "on", 
                "tx_checksum_fcoe_crc": "off [fixed]", 
                "tx_checksum_ip_generic": "on [fixed]", 
                "tx_checksum_ipv4": "off [fixed]", 
                "tx_checksum_ipv6": "off [fixed]", 
                "tx_checksum_sctp": "on [fixed]", 
                "tx_checksumming": "on", 
                "tx_fcoe_segmentation": "off [fixed]", 
                "tx_gre_csum_segmentation": "off [fixed]", 
                "tx_gre_segmentation": "off [fixed]", 
                "tx_gso_partial": "off [fixed]", 
                "tx_gso_robust": "off [fixed]", 
                "tx_ipip_segmentation": "off [fixed]", 
                "tx_lockless": "on [fixed]", 
                "tx_nocache_copy": "off [fixed]", 
                "tx_scatter_gather": "on [fixed]", 
                "tx_scatter_gather_fraglist": "on [fixed]", 
                "tx_sctp_segmentation": "on", 
                "tx_sit_segmentation": "off [fixed]", 
                "tx_tcp6_segmentation": "on", 
                "tx_tcp_ecn_segmentation": "on", 
                "tx_tcp_mangleid_segmentation": "on", 
                "tx_tcp_segmentation": "on", 
                "tx_udp_tnl_csum_segmentation": "off [fixed]", 
                "tx_udp_tnl_segmentation": "off [fixed]", 
                "tx_vlan_offload": "off [fixed]", 
                "tx_vlan_stag_hw_insert": "off [fixed]", 
                "udp_fragmentation_offload": "on", 
                "vlan_challenged": "on [fixed]"
            }, 
            "hw_timestamp_filters": [], 
            "ipv4": {
                "address": "127.0.0.1", 
                "broadcast": "host", 
                "netmask": "255.0.0.0", 
                "network": "127.0.0.0"
            }, 
            "ipv6": [
                {
                    "address": "::1", 
                    "prefix": "128", 
                    "scope": "host"
                }
            ], 
            "mtu": 65536, 
            "promisc": false, 
            "timestamping": [
                "rx_software", 
                "software"
            ], 
            "type": "loopback"
        }, 
        "ansible_local": {}, 
        "ansible_lsb": {}, 
        "ansible_lvm": {
            "lvs": {
                "root": {
                    "size_g": "27.79", 
                    "vg": "centos_node1"
                }, 
                "swap": {
                    "size_g": "3.20", 
                    "vg": "centos_node1"
                }
            }, 
            "pvs": {
                "/dev/sda2": {
                    "free_g": "0.00", 
                    "size_g": "31.00", 
                    "vg": "centos_node1"
                }
            }, 
            "vgs": {
                "centos_node1": {
                    "free_g": "0.00", 
                    "num_lvs": "2", 
                    "num_pvs": "1", 
                    "size_g": "31.00"
                }
            }
        }, 
        "ansible_machine": "x86_64", 
        "ansible_machine_id": "7b7531f97ab44be58b8d41b248326a0b", 
        "ansible_memfree_mb": 3667, 
        "ansible_memory_mb": {
            "nocache": {
                "free": 3757, 
                "used": 193
            }, 
            "real": {
                "free": 3667, 
                "total": 3950, 
                "used": 283
            }, 
            "swap": {
                "cached": 0, 
                "free": 3275, 
                "total": 3275, 
                "used": 0
            }
        }, 
        "ansible_memtotal_mb": 3950, 
        "ansible_mounts": [
            {
                "block_available": 7024856, 
                "block_size": 4096, 
                "block_total": 7282203, 
                "block_used": 257347, 
                "device": "/dev/mapper/centos_node1-root", 
                "fstype": "xfs", 
                "inode_available": 14544945, 
                "inode_total": 14571520, 
                "inode_used": 26575, 
                "mount": "/", 
                "options": "rw,seclabel,relatime,attr2,inode64,noquota", 
                "size_available": 28773810176, 
                "size_total": 29827903488, 
                "uuid": "d901feb5-f17b-4485-966b-0a859c952cf1"
            }, 
            {
                "block_available": 225783, 
                "block_size": 4096, 
                "block_total": 259584, 
                "block_used": 33801, 
                "device": "/dev/sda1", 
                "fstype": "xfs", 
                "inode_available": 523962, 
                "inode_total": 524288, 
                "inode_used": 326, 
                "mount": "/boot", 
                "options": "rw,seclabel,relatime,attr2,inode64,noquota", 
                "size_available": 924807168, 
                "size_total": 1063256064, 
                "uuid": "9e9a7038-41d5-4a7b-b83f-ab58802ea273"
            }
        ], 
        "ansible_nodename": "node1.exam.local", 
        "ansible_os_family": "RedHat", 
        "ansible_pkg_mgr": "yum", 
        "ansible_processor": [
            "0", 
            "GenuineIntel", 
            "Intel(R) Core(TM) i7-4930K CPU @ 3.40GHz"
        ], 
        "ansible_processor_cores": 1, 
        "ansible_processor_count": 1, 
        "ansible_processor_threads_per_core": 1, 
        "ansible_processor_vcpus": 1, 
        "ansible_product_name": "VMware Virtual Platform", 
        "ansible_product_serial": "VMware-56 4d 69 58 0d fd d8 73-8d 85 4a c7 1c 5c 89 c5", 
        "ansible_product_uuid": "58694D56-FD0D-73D8-8D85-4AC71C5C89C5", 
        "ansible_product_version": "None", 
        "ansible_python": {
            "executable": "/usr/bin/python", 
            "has_sslcontext": true, 
            "type": "CPython", 
            "version": {
                "major": 2, 
                "micro": 5, 
                "minor": 7, 
                "releaselevel": "final", 
                "serial": 0
            }, 
            "version_info": [
                2, 
                7, 
                5, 
                "final", 
                0
            ]
        }, 
        "ansible_python_version": "2.7.5", 
        "ansible_real_group_id": 0, 
        "ansible_real_user_id": 0, 
        "ansible_selinux": {
            "config_mode": "enforcing", 
            "mode": "enforcing", 
            "policyvers": 31, 
            "status": "enabled", 
            "type": "targeted"
        }, 
        "ansible_selinux_python_present": true, 
        "ansible_service_mgr": "systemd", 
        "ansible_ssh_host_key_ecdsa_public": "AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBL92KFmtJE3AYQrTLTyL9tdaHUMdmCRgyZ+rV4F9Smrf0qoNx8SWVOk83LlA89V2jjAAMYjXK54tIf5ajGvzx+Q=", 
        "ansible_ssh_host_key_ed25519_public": "AAAAC3NzaC1lZDI1NTE5AAAAIN049N90vHU4fUz25P6/3v8PeEQ/DW89/bCc3m+HtzuV", 
        "ansible_ssh_host_key_rsa_public": "AAAAB3NzaC1yc2EAAAADAQABAAABAQDh3f5ZbT+RSt52vG2IJzVAukaBXw43mbXLBLlJj/mcO6r0oZXmr8ICrrztUPWOV38tpyHZAJLwCG4WEVDMgewKO7hyOULTIFd+KhlcxWnGgDFHfq3rp5qsC/PErZ5674/Mu/bIJKsJn2cMoSFxVZ2OtHmGiG4sLbML47QDsx0OgQZwD6C3QxHzUcW8DBjqjAriOZd1QfdoL2xeUCM8ALiEzR8WprZy6DaS2gbj03V0tQMhrFxhvcJHA35MndcuNhpnR4xDbVr18NBOFhCjyVIO+kTTUSkDdkk5zawf36W9MV0K/l/FvRwa27lAvw29M93bcnnwOz8i5zAfh2PH86fr", 
        "ansible_swapfree_mb": 3275, 
        "ansible_swaptotal_mb": 3275, 
        "ansible_system": "Linux", 
        "ansible_system_capabilities": [
            "cap_chown", 
            "cap_dac_override", 
            "cap_dac_read_search", 
            "cap_fowner", 
            "cap_fsetid", 
            "cap_kill", 
            "cap_setgid", 
            "cap_setuid", 
            "cap_setpcap", 
            "cap_linux_immutable", 
            "cap_net_bind_service", 
            "cap_net_broadcast", 
            "cap_net_admin", 
            "cap_net_raw", 
            "cap_ipc_lock", 
            "cap_ipc_owner", 
            "cap_sys_module", 
            "cap_sys_rawio", 
            "cap_sys_chroot", 
            "cap_sys_ptrace", 
            "cap_sys_pacct", 
            "cap_sys_admin", 
            "cap_sys_boot", 
            "cap_sys_nice", 
            "cap_sys_resource", 
            "cap_sys_time", 
            "cap_sys_tty_config", 
            "cap_mknod", 
            "cap_lease", 
            "cap_audit_write", 
            "cap_audit_control", 
            "cap_setfcap", 
            "cap_mac_override", 
            "cap_mac_admin", 
            "cap_syslog", 
            "35", 
            "36+ep"
        ], 
        "ansible_system_capabilities_enforced": "True", 
        "ansible_system_vendor": "VMware, Inc.", 
        "ansible_uptime_seconds": 28594, 
        "ansible_user_dir": "/root", 
        "ansible_user_gecos": "root", 
        "ansible_user_gid": 0, 
        "ansible_user_id": "root", 
        "ansible_user_shell": "/bin/bash", 
        "ansible_user_uid": 0, 
        "ansible_userspace_architecture": "x86_64", 
        "ansible_userspace_bits": "64", 
        "ansible_virtualization_role": "guest", 
        "ansible_virtualization_type": "VMware", 
        "gather_subset": [
            "all"
        ], 
        "module_setup": true
    }, 
    "changed": false
}
[ansibleman@ansiblesv ansible]$ 

 変更履歴

2019/03/23 「参照方法」を追加

カテゴリー

目次

QooQ