Chapter 11

マジック変数

y_mrok
y_mrok
2021.10.18に更新
このチャプターの目次

説明

この章の説明はこのリンクをクリックしてください。

演習問題

Q. プレイブック check_magic_variable.yml を実行してして、自分自身の環境のマジック変数を確認してください。

hosts.yml
---
all:
  hosts:
    marutamachi:
  children:
    web:
      hosts:
        takeyamachi:
        ebisugawa:
        nijyo:
    mail:
      hosts:
        nijyo:
    database:
      hosts:
        oshikoji:
        oike:
group_vars/all.yml
---
ansible_user: vagrant
ansible_password: vagrant
group_vars/web.yml
---
http_port: 8080
host_vars/marutamachi.yml
---
ansible_host: 192.168.111.101
host_vars/takeyamachi.yml
---
ansible_host: 192.168.111.102
host_vars/ebisugawa.yml
---
ansible_host: 192.168.111.103
host_vars/nijyo.yml
---
ansible_host: 192.168.111.104
host_vars/oshikoji.yml
---
ansible_host: 192.168.111.105
ansible_python_interpreter: /usr/bin/python3
host_vars/oike.yml
---
ansible_host: 192.168.111.106
ansible_python_interpreter: /usr/libexec/platform-python
check_magic_variable.yml
---
- name: Check the value of the Magic variable.
  hosts: all
  gather_facts: no

  tasks:
    - name: Displays the value of inventor_hostname.
      ansible.builtin.debug:
        var: inventory_hostname
    - name: Displays the value of group_names
      ansible.builtin.debug:
        var: group_names
    - name: Displays the value of groups
      ansible.builtin.debug:
        var: groups
    - name: Displays the value of hostvars
      ansible.builtin.debug:
        var: hostvars
解答

字数制限により、実行ログの一部を省略しています。

y_mrok@ctrl:~/code/chap11$ ansible-playbook -i hosts.yml check_magic_variable.yml 

PLAY [Check the value of the Magic variable.] ********************************************************************************************************

TASK [Displays the value of inventor_hostname.] ******************************************************************************************************
ok: [marutamachi] => {
    "inventory_hostname": "marutamachi"
}
ok: [takeyamachi] => {
    "inventory_hostname": "takeyamachi"
}
ok: [ebisugawa] => {
    "inventory_hostname": "ebisugawa"
}
ok: [nijyo] => {
    "inventory_hostname": "nijyo"
}
ok: [oshikoji] => {
    "inventory_hostname": "oshikoji"
}
ok: [oike] => {
    "inventory_hostname": "oike"
}

TASK [Displays the value of group_names] *************************************************************************************************************
ok: [marutamachi] => {
    "group_names": [
        "ungrouped"
    ]
}
ok: [takeyamachi] => {
    "group_names": [
        "web"
    ]
}
ok: [ebisugawa] => {
    "group_names": [
        "web"
    ]
}
ok: [nijyo] => {
    "group_names": [
        "mail",
        "web"
    ]
}
ok: [oshikoji] => {
    "group_names": [
        "database"
    ]
}
ok: [oike] => {
    "group_names": [
        "database"
    ]
}

TASK [Displays the value of groups] ******************************************************************************************************************
ok: [marutamachi] => {
    "groups": {
        "all": [
            "marutamachi",
            "takeyamachi",
            "ebisugawa",
            "nijyo",
            "oshikoji",
            "oike"
        ],
        "database": [
            "oshikoji",
            "oike"
        ],
        "mail": [
            "nijyo"
        ],
        "ungrouped": [
            "marutamachi"
        ],
        "web": [
            "takeyamachi",
            "ebisugawa",
            "nijyo"
        ]
    }
}
ok: [takeyamachi] => {
    "groups": {
        "all": [
            "marutamachi",
            "takeyamachi",
            "ebisugawa",
            "nijyo",
            "oshikoji",
            "oike"
        ],
        "database": [
            "oshikoji",
            "oike"
        ],
        "mail": [
            "nijyo"
        ],
        "ungrouped": [
            "marutamachi"
        ],
        "web": [
            "takeyamachi",
            "ebisugawa",
            "nijyo"
        ]
    }
}
ok: [ebisugawa] => {
    "groups": {
        "all": [
            "marutamachi",
            "takeyamachi",
            "ebisugawa",
            "nijyo",
            "oshikoji",
            "oike"
        ],
        "database": [
            "oshikoji",
            "oike"
        ],
        "mail": [
            "nijyo"
        ],
        "ungrouped": [
            "marutamachi"
        ],
        "web": [
            "takeyamachi",
            "ebisugawa",
            "nijyo"
        ]
    }
}
ok: [oshikoji] => {
    "groups": {
        "all": [
            "marutamachi",
            "takeyamachi",
            "ebisugawa",
            "nijyo",
            "oshikoji",
            "oike"
        ],
        "database": [
            "oshikoji",
            "oike"
        ],
        "mail": [
            "nijyo"
        ],
        "ungrouped": [
            "marutamachi"
        ],
        "web": [
            "takeyamachi",
            "ebisugawa",
            "nijyo"
        ]
    }
}
ok: [nijyo] => {
    "groups": {
        "all": [
            "marutamachi",
            "takeyamachi",
            "ebisugawa",
            "nijyo",
            "oshikoji",
            "oike"
        ],
        "database": [
            "oshikoji",
            "oike"
        ],
        "mail": [
            "nijyo"
        ],
        "ungrouped": [
            "marutamachi"
        ],
        "web": [
            "takeyamachi",
            "ebisugawa",
            "nijyo"
        ]
    }
}
ok: [oike] => {
    "groups": {
        "all": [
            "marutamachi",
            "takeyamachi",
            "ebisugawa",
            "nijyo",
            "oshikoji",
            "oike"
        ],
        "database": [
            "oshikoji",
            "oike"
        ],
        "mail": [
            "nijyo"
        ],
        "ungrouped": [
            "marutamachi"
        ],
        "web": [
            "takeyamachi",
            "ebisugawa",
            "nijyo"
        ]
    }
}

TASK [Displays the value of hostvars] ****************************************************************************************************************
ok: [takeyamachi] => {
    "hostvars": {
        "ebisugawa": {
            "ansible_check_mode": false,
            "ansible_config_file": null,
            "ansible_diff_mode": false,
            "ansible_facts": {},
            "ansible_forks": 5,
            "ansible_host": "192.168.111.103",
            "ansible_inventory_sources": [
                "/home/y_mrok/code/chap11/hosts.yml"
            ],
            "ansible_password": "vagrant",
            "ansible_playbook_python": "/usr/bin/python3",
            "ansible_run_tags": [
                "all"
            ],
            "ansible_skip_tags": [],
            "ansible_user": "vagrant",
            "ansible_verbosity": 0,
            "ansible_version": {
                "full": "2.11.6",
                "major": 2,
                "minor": 11,
                "revision": 6,
                "string": "2.11.6"
            },
            "group_names": [
                "web"
            ],
            "groups": {
                "all": [
                    "marutamachi",
                    "takeyamachi",
                    "ebisugawa",
                    "nijyo",
                    "oshikoji",
                    "oike"
                ],
                "database": [
                    "oshikoji",
                    "oike"
                ],
                "mail": [
                    "nijyo"
                ],
                "ungrouped": [
                    "marutamachi"
                ],
                "web": [
                    "takeyamachi",
                    "ebisugawa",
                    "nijyo"
                ]
            },
            "http_port": 8080,
            "inventory_dir": "/home/y_mrok/code/chap11",
            "inventory_file": "/home/y_mrok/code/chap11/hosts.yml",
            "inventory_hostname": "ebisugawa",
            "inventory_hostname_short": "ebisugawa",
            "omit": "__omit_place_holder__79d0af8c30296d39b01f0425fd9cf22451a15fb0",
            "playbook_dir": "/home/y_mrok/code/chap11"
        },
        "marutamachi": {
            "ansible_check_mode": false,
            "ansible_config_file": null,
            "ansible_diff_mode": false,
            "ansible_facts": {},
            "ansible_forks": 5,
            "ansible_host": "192.168.111.101",
            "ansible_inventory_sources": [
                "/home/y_mrok/code/chap11/hosts.yml"
            ],
            "ansible_password": "vagrant",
            "ansible_playbook_python": "/usr/bin/python3",
            "ansible_run_tags": [
                "all"
            ],
            "ansible_skip_tags": [],
            "ansible_user": "vagrant",
            "ansible_verbosity": 0,
            "ansible_version": {
                "full": "2.11.6",
                "major": 2,
                "minor": 11,
                "revision": 6,
                "string": "2.11.6"
            },
            "group_names": [
                "ungrouped"
            ],
            "groups": {
                "all": [
                    "marutamachi",
                    "takeyamachi",
                    "ebisugawa",
                    "nijyo",
                    "oshikoji",
                    "oike"
                ],
                "database": [
                    "oshikoji",
                    "oike"
                ],
                "mail": [
                    "nijyo"
                ],
                "ungrouped": [
                    "marutamachi"
                ],
                "web": [
                    "takeyamachi",
                    "ebisugawa",
                    "nijyo"
                ]
            },
            "inventory_dir": "/home/y_mrok/code/chap11",
            "inventory_file": "/home/y_mrok/code/chap11/hosts.yml",
            "inventory_hostname": "marutamachi",
            "inventory_hostname_short": "marutamachi",
            "omit": "__omit_place_holder__79d0af8c30296d39b01f0425fd9cf22451a15fb0",
            "playbook_dir": "/home/y_mrok/code/chap11"
        },
        "nijyo": {
            "ansible_check_mode": false,
            "ansible_config_file": null,
            "ansible_diff_mode": false,
            "ansible_facts": {},
            "ansible_forks": 5,
            "ansible_host": "192.168.111.104",
            "ansible_inventory_sources": [
                "/home/y_mrok/code/chap11/hosts.yml"
            ],
            "ansible_password": "vagrant",
            "ansible_playbook_python": "/usr/bin/python3",
            "ansible_run_tags": [
                "all"
            ],
            "ansible_skip_tags": [],
            "ansible_user": "vagrant",
            "ansible_verbosity": 0,
            "ansible_version": {
                "full": "2.11.6",
                "major": 2,
                "minor": 11,
                "revision": 6,
                "string": "2.11.6"
            },
            "group_names": [
                "mail",
                "web"
            ],
            "groups": {
                "all": [
                    "marutamachi",
                    "takeyamachi",
                    "ebisugawa",
                    "nijyo",
                    "oshikoji",
                    "oike"
                ],
                "database": [
                    "oshikoji",
                    "oike"
                ],
                "mail": [
                    "nijyo"
                ],
                "ungrouped": [
                    "marutamachi"
                ],
                "web": [
                    "takeyamachi",
                    "ebisugawa",
                    "nijyo"
                ]
            },
            "http_port": 8080,
            "inventory_dir": "/home/y_mrok/code/chap11",
            "inventory_file": "/home/y_mrok/code/chap11/hosts.yml",
            "inventory_hostname": "nijyo",
            "inventory_hostname_short": "nijyo",
            "omit": "__omit_place_holder__79d0af8c30296d39b01f0425fd9cf22451a15fb0",
            "playbook_dir": "/home/y_mrok/code/chap11"
        },
        "oike": {
            "ansible_check_mode": false,
            "ansible_config_file": null,
            "ansible_diff_mode": false,
            "ansible_facts": {},
            "ansible_forks": 5,
            "ansible_host": "192.168.111.106",
            "ansible_inventory_sources": [
                "/home/y_mrok/code/chap11/hosts.yml"
            ],
            "ansible_password": "vagrant",
            "ansible_playbook_python": "/usr/bin/python3",
            "ansible_python_interpreter": "/usr/libexec/platform-python",
            "ansible_run_tags": [
                "all"
            ],
            "ansible_skip_tags": [],
            "ansible_user": "vagrant",
            "ansible_verbosity": 0,
            "ansible_version": {
                "full": "2.11.6",
                "major": 2,
                "minor": 11,
                "revision": 6,
                "string": "2.11.6"
            },
            "group_names": [
                "database"
            ],
            "groups": {
                "all": [
                    "marutamachi",
                    "takeyamachi",
                    "ebisugawa",
                    "nijyo",
                    "oshikoji",
                    "oike"
                ],
                "database": [
                    "oshikoji",
                    "oike"
                ],
                "mail": [
                    "nijyo"
                ],
                "ungrouped": [
                    "marutamachi"
                ],
                "web": [
                    "takeyamachi",
                    "ebisugawa",
                    "nijyo"
                ]
            },
            "inventory_dir": "/home/y_mrok/code/chap11",
            "inventory_file": "/home/y_mrok/code/chap11/hosts.yml",
            "inventory_hostname": "oike",
            "inventory_hostname_short": "oike",
            "omit": "__omit_place_holder__79d0af8c30296d39b01f0425fd9cf22451a15fb0",
            "playbook_dir": "/home/y_mrok/code/chap11"
        },
        "oshikoji": {
            "ansible_check_mode": false,
            "ansible_config_file": null,
            "ansible_diff_mode": false,
            "ansible_facts": {},
            "ansible_forks": 5,
            "ansible_host": "192.168.111.105",
            "ansible_inventory_sources": [
                "/home/y_mrok/code/chap11/hosts.yml"
            ],
            "ansible_password": "vagrant",
            "ansible_playbook_python": "/usr/bin/python3",
            "ansible_python_interpreter": "/usr/bin/python3",
            "ansible_run_tags": [
                "all"
            ],
            "ansible_skip_tags": [],
            "ansible_user": "vagrant",
            "ansible_verbosity": 0,
            "ansible_version": {
                "full": "2.11.6",
                "major": 2,
                "minor": 11,
                "revision": 6,
                "string": "2.11.6"
            },
            "group_names": [
                "database"
            ],
            "groups": {
                "all": [
                    "marutamachi",
                    "takeyamachi",
                    "ebisugawa",
                    "nijyo",
                    "oshikoji",
                    "oike"
                ],
                "database": [
                    "oshikoji",
                    "oike"
                ],
                "mail": [
                    "nijyo"
                ],
                "ungrouped": [
                    "marutamachi"
                ],
                "web": [
                    "takeyamachi",
                    "ebisugawa",
                    "nijyo"
                ]
            },
            "inventory_dir": "/home/y_mrok/code/chap11",
            "inventory_file": "/home/y_mrok/code/chap11/hosts.yml",
            "inventory_hostname": "oshikoji",
            "inventory_hostname_short": "oshikoji",
            "omit": "__omit_place_holder__79d0af8c30296d39b01f0425fd9cf22451a15fb0",
            "playbook_dir": "/home/y_mrok/code/chap11"
        },
        "takeyamachi": {
            "ansible_check_mode": false,
            "ansible_config_file": null,
            "ansible_diff_mode": false,
            "ansible_facts": {},
            "ansible_forks": 5,
            "ansible_host": "192.168.111.102",
            "ansible_inventory_sources": [
                "/home/y_mrok/code/chap11/hosts.yml"
            ],
            "ansible_password": "vagrant",
            "ansible_playbook_python": "/usr/bin/python3",
            "ansible_run_tags": [
                "all"
            ],
            "ansible_skip_tags": [],
            "ansible_user": "vagrant",
            "ansible_verbosity": 0,
            "ansible_version": {
                "full": "2.11.6",
                "major": 2,
                "minor": 11,
                "revision": 6,
                "string": "2.11.6"
            },
            "group_names": [
                "web"
            ],
            "groups": {
                "all": [
                    "marutamachi",
                    "takeyamachi",
                    "ebisugawa",
                    "nijyo",
                    "oshikoji",
                    "oike"
                ],
                "database": [
                    "oshikoji",
                    "oike"
                ],
                "mail": [
                    "nijyo"
                ],
                "ungrouped": [
                    "marutamachi"
                ],
                "web": [
                    "takeyamachi",
                    "ebisugawa",
                    "nijyo"
                ]
            },
            "http_port": 8080,
            "inventory_dir": "/home/y_mrok/code/chap11",
            "inventory_file": "/home/y_mrok/code/chap11/hosts.yml",
            "inventory_hostname": "takeyamachi",
            "inventory_hostname_short": "takeyamachi",
            "omit": "__omit_place_holder__79d0af8c30296d39b01f0425fd9cf22451a15fb0",
            "playbook_dir": "/home/y_mrok/code/chap11"
        }
    }
}
ok: [marutamachi] => {
    "hostvars": {
        "ebisugawa": {
            "ansible_check_mode": false,
            "ansible_config_file": null,
            "ansible_diff_mode": false,
            "ansible_facts": {},
            "ansible_forks": 5,
            "ansible_host": "192.168.111.103",
            "ansible_inventory_sources": [
                "/home/y_mrok/code/chap11/hosts.yml"
            ],
            "ansible_password": "vagrant",
            "ansible_playbook_python": "/usr/bin/python3",
            "ansible_run_tags": [
                "all"
            ],
            "ansible_skip_tags": [],
            "ansible_user": "vagrant",
            "ansible_verbosity": 0,
            "ansible_version": {
                "full": "2.11.6",
                "major": 2,
                "minor": 11,
                "revision": 6,
                "string": "2.11.6"
            },
            "group_names": [
                "web"
            ],
            "groups": {
                "all": [
                    "marutamachi",
                    "takeyamachi",
                    "ebisugawa",
                    "nijyo",
                    "oshikoji",
                    "oike"
                ],
                "database": [
                    "oshikoji",
                    "oike"
                ],
                "mail": [
                    "nijyo"
                ],
                "ungrouped": [
                    "marutamachi"
                ],
                "web": [
                    "takeyamachi",
                    "ebisugawa",
                    "nijyo"
                ]
            },
            "http_port": 8080,
            "inventory_dir": "/home/y_mrok/code/chap11",
            "inventory_file": "/home/y_mrok/code/chap11/hosts.yml",
            "inventory_hostname": "ebisugawa",
            "inventory_hostname_short": "ebisugawa",
            "omit": "__omit_place_holder__79d0af8c30296d39b01f0425fd9cf22451a15fb0",
            "playbook_dir": "/home/y_mrok/code/chap11"
        },
        "marutamachi": {
            "ansible_check_mode": false,
            "ansible_config_file": null,
            "ansible_diff_mode": false,
            "ansible_facts": {},
            "ansible_forks": 5,
            "ansible_host": "192.168.111.101",
            "ansible_inventory_sources": [
                "/home/y_mrok/code/chap11/hosts.yml"
            ],
            "ansible_password": "vagrant",
            "ansible_playbook_python": "/usr/bin/python3",
            "ansible_run_tags": [
                "all"
            ],
            "ansible_skip_tags": [],
            "ansible_user": "vagrant",
            "ansible_verbosity": 0,
            "ansible_version": {
                "full": "2.11.6",
                "major": 2,
                "minor": 11,
                "revision": 6,
                "string": "2.11.6"
            },
            "group_names": [
                "ungrouped"
            ],
            "groups": {
                "all": [
                    "marutamachi",
                    "takeyamachi",
                    "ebisugawa",
                    "nijyo",
                    "oshikoji",
                    "oike"
                ],
                "database": [
                    "oshikoji",
                    "oike"
                ],
                "mail": [
                    "nijyo"
                ],
                "ungrouped": [
                    "marutamachi"
                ],
                "web": [
                    "takeyamachi",
                    "ebisugawa",
                    "nijyo"
                ]
            },
            "inventory_dir": "/home/y_mrok/code/chap11",
            "inventory_file": "/home/y_mrok/code/chap11/hosts.yml",
            "inventory_hostname": "marutamachi",
            "inventory_hostname_short": "marutamachi",
            "omit": "__omit_place_holder__79d0af8c30296d39b01f0425fd9cf22451a15fb0",
            "playbook_dir": "/home/y_mrok/code/chap11"
        },
        "nijyo": {
            "ansible_check_mode": false,
            "ansible_config_file": null,
            "ansible_diff_mode": false,
            "ansible_facts": {},
            "ansible_forks": 5,
            "ansible_host": "192.168.111.104",
            "ansible_inventory_sources": [
                "/home/y_mrok/code/chap11/hosts.yml"
            ],
            "ansible_password": "vagrant",
            "ansible_playbook_python": "/usr/bin/python3",
            "ansible_run_tags": [
                "all"
            ],
            "ansible_skip_tags": [],
            "ansible_user": "vagrant",
            "ansible_verbosity": 0,
            "ansible_version": {
                "full": "2.11.6",
                "major": 2,
                "minor": 11,
                "revision": 6,
                "string": "2.11.6"
            },
            "group_names": [
                "mail",
                "web"
            ],
            "groups": {
                "all": [
                    "marutamachi",
                    "takeyamachi",
                    "ebisugawa",
                    "nijyo",
                    "oshikoji",
                    "oike"
                ],
                "database": [
                    "oshikoji",
                    "oike"
                ],
                "mail": [
                    "nijyo"
                ],
                "ungrouped": [
                    "marutamachi"
                ],
                "web": [
                    "takeyamachi",
                    "ebisugawa",
                    "nijyo"
                ]
            },
            "http_port": 8080,
            "inventory_dir": "/home/y_mrok/code/chap11",
            "inventory_file": "/home/y_mrok/code/chap11/hosts.yml",
            "inventory_hostname": "nijyo",
            "inventory_hostname_short": "nijyo",
            "omit": "__omit_place_holder__79d0af8c30296d39b01f0425fd9cf22451a15fb0",
            "playbook_dir": "/home/y_mrok/code/chap11"
        },
        "oike": {
            "ansible_check_mode": false,
            "ansible_config_file": null,
            "ansible_diff_mode": false,
            "ansible_facts": {},
            "ansible_forks": 5,
            "ansible_host": "192.168.111.106",
            "ansible_inventory_sources": [
                "/home/y_mrok/code/chap11/hosts.yml"
            ],
            "ansible_password": "vagrant",
            "ansible_playbook_python": "/usr/bin/python3",
            "ansible_python_interpreter": "/usr/libexec/platform-python",
            "ansible_run_tags": [
                "all"
            ],
            "ansible_skip_tags": [],
            "ansible_user": "vagrant",
            "ansible_verbosity": 0,
            "ansible_version": {
                "full": "2.11.6",
                "major": 2,
                "minor": 11,
                "revision": 6,
                "string": "2.11.6"
            },
            "group_names": [
                "database"
            ],
            "groups": {
                "all": [
                    "marutamachi",
                    "takeyamachi",
                    "ebisugawa",
                    "nijyo",
                    "oshikoji",
                    "oike"
                ],
                "database": [
                    "oshikoji",
                    "oike"
                ],
                "mail": [
                    "nijyo"
                ],
                "ungrouped": [
                    "marutamachi"
                ],
                "web": [
                    "takeyamachi",
                    "ebisugawa",
                    "nijyo"
                ]
            },
            "inventory_dir": "/home/y_mrok/code/chap11",
            "inventory_file": "/home/y_mrok/code/chap11/hosts.yml",
            "inventory_hostname": "oike",
            "inventory_hostname_short": "oike",
            "omit": "__omit_place_holder__79d0af8c30296d39b01f0425fd9cf22451a15fb0",
            "playbook_dir": "/home/y_mrok/code/chap11"
        },
        "oshikoji": {
            "ansible_check_mode": false,
            "ansible_config_file": null,
            "ansible_diff_mode": false,
            "ansible_facts": {},
            "ansible_forks": 5,
            "ansible_host": "192.168.111.105",
            "ansible_inventory_sources": [
                "/home/y_mrok/code/chap11/hosts.yml"
            ],
            "ansible_password": "vagrant",
            "ansible_playbook_python": "/usr/bin/python3",
            "ansible_python_interpreter": "/usr/bin/python3",
            "ansible_run_tags": [
                "all"
            ],
            "ansible_skip_tags": [],
            "ansible_user": "vagrant",
            "ansible_verbosity": 0,
            "ansible_version": {
                "full": "2.11.6",
                "major": 2,
                "minor": 11,
                "revision": 6,
                "string": "2.11.6"
            },
            "group_names": [
                "database"
            ],
            "groups": {
                "all": [
                    "marutamachi",
                    "takeyamachi",
                    "ebisugawa",
                    "nijyo",
                    "oshikoji",
                    "oike"
                ],
                "database": [
                    "oshikoji",
                    "oike"
                ],
                "mail": [
                    "nijyo"
                ],
                "ungrouped": [
                    "marutamachi"
                ],
                "web": [
                    "takeyamachi",
                    "ebisugawa",
                    "nijyo"
                ]
            },
            "inventory_dir": "/home/y_mrok/code/chap11",
            "inventory_file": "/home/y_mrok/code/chap11/hosts.yml",
            "inventory_hostname": "oshikoji",
            "inventory_hostname_short": "oshikoji",
            "omit": "__omit_place_holder__79d0af8c30296d39b01f0425fd9cf22451a15fb0",
            "playbook_dir": "/home/y_mrok/code/chap11"
        },
        "takeyamachi": {
            "ansible_check_mode": false,
            "ansible_config_file": null,
            "ansible_diff_mode": false,
            "ansible_facts": {},
            "ansible_forks": 5,
            "ansible_host": "192.168.111.102",
            "ansible_inventory_sources": [
                "/home/y_mrok/code/chap11/hosts.yml"
            ],
            "ansible_password": "vagrant",
            "ansible_playbook_python": "/usr/bin/python3",
            "ansible_run_tags": [
                "all"
            ],
            "ansible_skip_tags": [],
            "ansible_user": "vagrant",
            "ansible_verbosity": 0,
            "ansible_version": {
                "full": "2.11.6",
                "major": 2,
                "minor": 11,
                "revision": 6,
                "string": "2.11.6"
            },
            "group_names": [
                "web"
            ],
            "groups": {
                "all": [
                    "marutamachi",
                    "takeyamachi",
                    "ebisugawa",
                    "nijyo",
                    "oshikoji",
                    "oike"
                ],
                "database": [
                    "oshikoji",
                    "oike"
                ],
                "mail": [
                    "nijyo"
                ],
                "ungrouped": [
                    "marutamachi"
                ],
                "web": [
                    "takeyamachi",
                    "ebisugawa",
                    "nijyo"
                ]
            },
            "http_port": 8080,
            "inventory_dir": "/home/y_mrok/code/chap11",
            "inventory_file": "/home/y_mrok/code/chap11/hosts.yml",
            "inventory_hostname": "takeyamachi",
            "inventory_hostname_short": "takeyamachi",
            "omit": "__omit_place_holder__79d0af8c30296d39b01f0425fd9cf22451a15fb0",
            "playbook_dir": "/home/y_mrok/code/chap11"
        }
    }
}
ok: [ebisugawa] => {
    "hostvars": {
        "ebisugawa": {
            "ansible_check_mode": false,
            "ansible_config_file": null,
            "ansible_diff_mode": false,
            "ansible_facts": {},
            "ansible_forks": 5,
            "ansible_host": "192.168.111.103",
            "ansible_inventory_sources": [
                "/home/y_mrok/code/chap11/hosts.yml"
            ],
            "ansible_password": "vagrant",
            "ansible_playbook_python": "/usr/bin/python3",
            "ansible_run_tags": [
                "all"
            ],
            "ansible_skip_tags": [],
            "ansible_user": "vagrant",
            "ansible_verbosity": 0,
            "ansible_version": {
                "full": "2.11.6",
                "major": 2,
                "minor": 11,
                "revision": 6,
                "string": "2.11.6"
            },
            "group_names": [
                "web"
            ],
            "groups": {
                "all": [
                    "marutamachi",
                    "takeyamachi",
                    "ebisugawa",
                    "nijyo",
                    "oshikoji",
                    "oike"
                ],
                "database": [
                    "oshikoji",
                    "oike"
                ],
                "mail": [
                    "nijyo"
                ],
                "ungrouped": [
                    "marutamachi"
                ],
                "web": [
                    "takeyamachi",
                    "ebisugawa",
                    "nijyo"
                ]
            },
            "http_port": 8080,
            "inventory_dir": "/home/y_mrok/code/chap11",
            "inventory_file": "/home/y_mrok/code/chap11/hosts.yml",
            "inventory_hostname": "ebisugawa",
            "inventory_hostname_short": "ebisugawa",
            "omit": "__omit_place_holder__79d0af8c30296d39b01f0425fd9cf22451a15fb0",
            "playbook_dir": "/home/y_mrok/code/chap11"
        },
        "marutamachi": {
            "ansible_check_mode": false,
            "ansible_config_file": null,
            "ansible_diff_mode": false,
            "ansible_facts": {},
            "ansible_forks": 5,
            "ansible_host": "192.168.111.101",
            "ansible_inventory_sources": [
                "/home/y_mrok/code/chap11/hosts.yml"
            ],
            "ansible_password": "vagrant",
            "ansible_playbook_python": "/usr/bin/python3",
            "ansible_run_tags": [
                "all"
            ],
            "ansible_skip_tags": [],
            "ansible_user": "vagrant",
            "ansible_verbosity": 0,
            "ansible_version": {
                "full": "2.11.6",
                "major": 2,
                "minor": 11,
                "revision": 6,
                "string": "2.11.6"
            },
            "group_names": [
                "ungrouped"
            ],
            "groups": {
                "all": [
                    "marutamachi",
                    "takeyamachi",
                    "ebisugawa",
                    "nijyo",
                    "oshikoji",
                    "oike"
                ],
                "database": [
                    "oshikoji",
                    "oike"
                ],
                "mail": [
                    "nijyo"
                ],
                "ungrouped": [
                    "marutamachi"
                ],
                "web": [
                    "takeyamachi",
                    "ebisugawa",
                    "nijyo"
                ]
            },
            "inventory_dir": "/home/y_mrok/code/chap11",
            "inventory_file": "/home/y_mrok/code/chap11/hosts.yml",
            "inventory_hostname": "marutamachi",
            "inventory_hostname_short": "marutamachi",
            "omit": "__omit_place_holder__79d0af8c30296d39b01f0425fd9cf22451a15fb0",
            "playbook_dir": "/home/y_mrok/code/chap11"
        },
        "nijyo": {
            "ansible_check_mode": false,
            "ansible_config_file": null,
            "ansible_diff_mode": false,
            "ansible_facts": {},
            "ansible_forks": 5,
            "ansible_host": "192.168.111.104",
            "ansible_inventory_sources": [
                "/home/y_mrok/code/chap11/hosts.yml"
            ],
            "ansible_password": "vagrant",
            "ansible_playbook_python": "/usr/bin/python3",
            "ansible_run_tags": [
                "all"
            ],
            "ansible_skip_tags": [],
            "ansible_user": "vagrant",
            "ansible_verbosity": 0,
            "ansible_version": {
                "full": "2.11.6",
                "major": 2,
                "minor": 11,
                "revision": 6,
                "string": "2.11.6"
            },
            "group_names": [
                "mail",
                "web"
            ],
            "groups": {
                "all": [
                    "marutamachi",
                    "takeyamachi",
                    "ebisugawa",
                    "nijyo",
                    "oshikoji",
                    "oike"
                ],
                "database": [
                    "oshikoji",
                    "oike"
                ],
                "mail": [
                    "nijyo"
                ],
                "ungrouped": [
                    "marutamachi"
                ],
                "web": [
                    "takeyamachi",
                    "ebisugawa",
                    "nijyo"
                ]
            },
            "http_port": 8080,
            "inventory_dir": "/home/y_mrok/code/chap11",
            "inventory_file": "/home/y_mrok/code/chap11/hosts.yml",
            "inventory_hostname": "nijyo",
            "inventory_hostname_short": "nijyo",
            "omit": "__omit_place_holder__79d0af8c30296d39b01f0425fd9cf22451a15fb0",
            "playbook_dir": "/home/y_mrok/code/chap11"
        },
        "oike": {
            "ansible_check_mode": false,
            "ansible_config_file": null,
            "ansible_diff_mode": false,
            "ansible_facts": {},
            "ansible_forks": 5,
            "ansible_host": "192.168.111.106",
            "ansible_inventory_sources": [
                "/home/y_mrok/code/chap11/hosts.yml"
            ],
            "ansible_password": "vagrant",
            "ansible_playbook_python": "/usr/bin/python3",
            "ansible_python_interpreter": "/usr/libexec/platform-python",
            "ansible_run_tags": [
                "all"
            ],
            "ansible_skip_tags": [],
            "ansible_user": "vagrant",
            "ansible_verbosity": 0,
            "ansible_version": {
                "full": "2.11.6",
                "major": 2,
                "minor": 11,
                "revision": 6,
                "string": "2.11.6"
            },
            "group_names": [
                "database"
            ],
            "groups": {
                "all": [
                    "marutamachi",
                    "takeyamachi",
                    "ebisugawa",
                    "nijyo",
                    "oshikoji",
                    "oike"
                ],
                "database": [
                    "oshikoji",
                    "oike"
                ],
                "mail": [
                    "nijyo"
                ],
                "ungrouped": [
                    "marutamachi"
                ],
                "web": [
                    "takeyamachi",
                    "ebisugawa",
                    "nijyo"
                ]
            },
            "inventory_dir": "/home/y_mrok/code/chap11",
            "inventory_file": "/home/y_mrok/code/chap11/hosts.yml",
            "inventory_hostname": "oike",
            "inventory_hostname_short": "oike",
            "omit": "__omit_place_holder__79d0af8c30296d39b01f0425fd9cf22451a15fb0",
            "playbook_dir": "/home/y_mrok/code/chap11"
        },
        "oshikoji": {
            "ansible_check_mode": false,
            "ansible_config_file": null,
            "ansible_diff_mode": false,
            "ansible_facts": {},
            "ansible_forks": 5,
            "ansible_host": "192.168.111.105",
            "ansible_inventory_sources": [
                "/home/y_mrok/code/chap11/hosts.yml"
            ],
            "ansible_password": "vagrant",
            "ansible_playbook_python": "/usr/bin/python3",
            "ansible_python_interpreter": "/usr/bin/python3",
            "ansible_run_tags": [
                "all"
            ],
            "ansible_skip_tags": [],
            "ansible_user": "vagrant",
            "ansible_verbosity": 0,
            "ansible_version": {
                "full": "2.11.6",
                "major": 2,
                "minor": 11,
                "revision": 6,
                "string": "2.11.6"
            },
            "group_names": [
                "database"
            ],
            "groups": {
                "all": [
                    "marutamachi",
                    "takeyamachi",
                    "ebisugawa",
                    "nijyo",
                    "oshikoji",
                    "oike"
                ],
                "database": [
                    "oshikoji",
                    "oike"
                ],
                "mail": [
                    "nijyo"
                ],
                "ungrouped": [
                    "marutamachi"
                ],
                "web": [
                    "takeyamachi",
                    "ebisugawa",
                    "nijyo"
                ]
            },
            "inventory_dir": "/home/y_mrok/code/chap11",
            "inventory_file": "/home/y_mrok/code/chap11/hosts.yml",
            "inventory_hostname": "oshikoji",
            "inventory_hostname_short": "oshikoji",
            "omit": "__omit_place_holder__79d0af8c30296d39b01f0425fd9cf22451a15fb0",
            "playbook_dir": "/home/y_mrok/code/chap11"
        },
        "takeyamachi": {
            "ansible_check_mode": false,
            "ansible_config_file": null,
            "ansible_diff_mode": false,
            "ansible_facts": {},
            "ansible_forks": 5,
            "ansible_host": "192.168.111.102",
            "ansible_inventory_sources": [
                "/home/y_mrok/code/chap11/hosts.yml"
            ],
            "ansible_password": "vagrant",
            "ansible_playbook_python": "/usr/bin/python3",
            "ansible_run_tags": [
                "all"
            ],
            "ansible_skip_tags": [],
            "ansible_user": "vagrant",
            "ansible_verbosity": 0,
            "ansible_version": {
                "full": "2.11.6",
                "major": 2,
                "minor": 11,
                "revision": 6,
                "string": "2.11.6"
            },
            "group_names": [
                "web"
            ],
            "groups": {
                "all": [
                    "marutamachi",
                    "takeyamachi",
                    "ebisugawa",
                    "nijyo",
                    "oshikoji",
                    "oike"
                ],
                "database": [
                    "oshikoji",
                    "oike"
                ],
                "mail": [
                    "nijyo"
                ],
                "ungrouped": [
                    "marutamachi"
                ],
                "web": [
                    "takeyamachi",
                    "ebisugawa",
                    "nijyo"
                ]
            },
            "http_port": 8080,
            "inventory_dir": "/home/y_mrok/code/chap11",
            "inventory_file": "/home/y_mrok/code/chap11/hosts.yml",
            "inventory_hostname": "takeyamachi",
            "inventory_hostname_short": "takeyamachi",
            "omit": "__omit_place_holder__79d0af8c30296d39b01f0425fd9cf22451a15fb0",
            "playbook_dir": "/home/y_mrok/code/chap11"
        }
    }
}
ok: [nijyo] => {
    "hostvars": {
        "ebisugawa": {

省略

        },
        "marutamachi": {

省略

        },
        "nijyo": {

省略

        },
        "oike": {

省略

        },
        "oshikoji": {

省略

        },
        "takeyamachi": {

省略

        }
    }
}
ok: [oshikoji] => {
    "hostvars": {
        "ebisugawa": {

省略

        },
        "marutamachi": {

省略

        },
        "nijyo": {

省略

        },
        "oike": {

省略

        },
        "oshikoji": {

省略

        },
        "takeyamachi": {

省略

        }
    }
}
ok: [oike] => {
    "hostvars": {
        "ebisugawa": {

省略

        },
        "marutamachi": {

省略

        },
        "nijyo": {

省略

        },
        "oike": {

省略

        },
        "oshikoji": {

省略

        },
        "takeyamachi": {

省略

        }
    }
}

PLAY RECAP *******************************************************************************************************************************************
ebisugawa                  : ok=4    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
marutamachi                : ok=4    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
nijyo                      : ok=4    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
oike                       : ok=4    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
oshikoji                   : ok=4    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
takeyamachi                : ok=4    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   

y_mrok@ctrl:~/code/chap11$