Ansibleの変数情報

ansibleの変数を表示の仕方

```
 ansible mq1 -i inventory.ini -m setup
```

ansibleの文字列で絞ると以下のような感じになります。

```

 [root@docker163 ansible]# ansible mq1 -i inventory.ini -m setup | grep -i ansible
    "ansible_facts": {
        "ansible_all_ipv4_addresses": [
        "ansible_all_ipv6_addresses": [],
        "ansible_apparmor": {
        "ansible_architecture": "x86_64",
        "ansible_bios_date": "11/12/2020",
        "ansible_bios_vendor": "Phoenix Technologies LTD",
        "ansible_bios_version": "6.00",
        "ansible_board_asset_tag": "NA",
        "ansible_board_name": "440BX Desktop Reference Platform",
        "ansible_board_serial": "None",
        "ansible_board_vendor": "Intel Corporation",
        "ansible_board_version": "None",
        "ansible_chassis_asset_tag": "No Asset Tag",
        "ansible_chassis_serial": "None",
        "ansible_chassis_vendor": "No Enclosure",
        "ansible_chassis_version": "N/A",
        "ansible_cmdline": {
        "ansible_date_time": {
        "ansible_default_ipv4": {
        "ansible_default_ipv6": {},
        "ansible_device_links": {
        "ansible_devices": {
        "ansible_distribution": "RedHat",
        "ansible_distribution_file_parsed": true,
        "ansible_distribution_file_path": "/etc/redhat-release",
        "ansible_distribution_file_search_string": "Red Hat",
        "ansible_distribution_file_variety": "RedHat",
        "ansible_distribution_major_version": "7",
        "ansible_distribution_release": "Maipo",
        "ansible_distribution_version": "7.7",
        "ansible_dns": {
        "ansible_domain": "",
        "ansible_effective_group_id": 0,
        "ansible_effective_user_id": 0,
        "ansible_ens192": {
        "ansible_env": {
        "ansible_fibre_channel_wwn": [],
        "ansible_fips": false,
        "ansible_form_factor": "Other",
        "ansible_fqdn": "mq1",
        "ansible_hostname": "mq1",
        "ansible_hostnqn": "",
        "ansible_interfaces": [
        "ansible_is_chroot": false,
        "ansible_iscsi_iqn": "iqn.1994-05.com.redhat:2510227983d",
        "ansible_kernel": "3.10.0-1062.el7.x86_64",
        "ansible_kernel_version": "#1 SMP Thu Jul 18 20:25:13 UTC 2019",
        "ansible_lo": {
        "ansible_loadavg": {
        "ansible_local": {},
        "ansible_locally_reachable_ips": {
        "ansible_lsb": {},
        "ansible_lvm": {
        "ansible_machine": "x86_64",
        "ansible_machine_id": "74462f256b974ae6b8f45f911d836b6b",
        "ansible_memfree_mb": 2195,
        "ansible_memory_mb": {
        "ansible_memtotal_mb": 3789,
        "ansible_mounts": [
        "ansible_nodename": "mq1",
        "ansible_os_family": "RedHat",
        "ansible_pkg_mgr": "yum",
        "ansible_proc_cmdline": {
        "ansible_processor": [
        "ansible_processor_cores": 1,
        "ansible_processor_count": 2,
        "ansible_processor_nproc": 2,
        "ansible_processor_threads_per_core": 1,
        "ansible_processor_vcpus": 2,
        "ansible_product_name": "VMware Virtual Platform",
        "ansible_product_serial": "VMware-56 4d 0d b7 aa ad 6e ed-bb 28 89 b6 f2 59 b0 6f",
        "ansible_product_uuid": "B70D4D56-XDAA-ED6E-BB28-89B6F259B06F",
        "ansible_product_version": "None",
        "ansible_python": {
        "ansible_python_version": "2.7.5",
        "ansible_real_group_id": 0,
        "ansible_real_user_id": 0,
        "ansible_selinux": {
        "ansible_selinux_python_present": true,
        "ansible_service_mgr": "systemd",
        "ansible_ssh_host_key_ecdsa_public": "AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBOHeAKtPE5cx0GnXQnKJAogwc7qSuYptU2gPvwMLASLo92haFkRAvVhAyjQjxqlJOh1RMsc4Qgj8XTUAZ6tH6Gk=",
        "ansible_ssh_host_key_ecdsa_public_keytype": "ecdsa-sha2-nistp256",
        "ansible_ssh_host_key_ed25519_public": "AAAAC3NzaC1lZDI1NTE5AAAAICX8BsmMcKmbQ3VSSQ73RDKrGLGj5iJM0fAyrkqCq3if",
        "ansible_ssh_host_key_ed25519_public_keytype": "ssh-ed25519",
        "ansible_ssh_host_key_rsa_public": "AAAAB3NzaC1yc2EAAAADAQABAAABAQC2ixR40X3otMHESd4mRR6oEaOQXOmhTL0I5/4YIVWhdt3qAQ/4dBay1NRuHwthms10wn0nGgod7g0giPdZwQS+mwRm7/8pRnXmfACUKrdeAjjQTKukCaJP4tJ4V1pBKvicw7AgJdErqiOhvxAJScfDmF/i1S8D5DP4FpYX1l0iU28OxoWFVy01IkVWDgvchAhF9nenparVleBEhns1ncmy6sWTuDIyUTE1b35vk4CIPiITQ3DHgolHh0wRuzqhcjp8hX/i5seu84dMKp6C8NLSlR+rL+PWfvBZD/A7vHf8J5zZ2B16RhBHAGgTNIkLWHh1EeMQNtjg7hFIjs66yuSd",
        "ansible_ssh_host_key_rsa_public_keytype": "ssh-rsa",
        "ansible_swapfree_mb": 3071,
        "ansible_swaptotal_mb": 3071,
        "ansible_system": "Linux",
        "ansible_system_capabilities": [
        "ansible_system_capabilities_enforced": "True",
        "ansible_system_vendor": "VMware, Inc.",
        "ansible_uptime_seconds": 5444,
        "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_virbr0": {
        "ansible_virbr0_nic": {
        "ansible_virtualization_role": "guest",
        "ansible_virtualization_tech_guest": [
        "ansible_virtualization_tech_host": [],
        "ansible_virtualization_type": "VMware",
[root@docker163 ansible]#

```