ただのメモです。
変数 ansible_default_ipv4.address
で取得できる。
ansible_eth0.ipv4.address
で取得できる場合も多いが、targetのIPアドレスが必ずしもeth0に設定されているとは限らないので前者が良さそう。
https://docs.ansible.com/ansible/latest/user_guide/playbooks_variables.html
Go to list of users who liked
More than 5 years have passed since last update.
ただのメモです。
変数 ansible_default_ipv4.address
で取得できる。
ansible_eth0.ipv4.address
で取得できる場合も多いが、targetのIPアドレスが必ずしもeth0に設定されているとは限らないので前者が良さそう。
https://docs.ansible.com/ansible/latest/user_guide/playbooks_variables.html
Register as a new user and use Qiita more conveniently
Go to list of users who liked