Where can I get a list of Ansible pre-defined variables?

后端 未结 10 2322
谎友^
谎友^ 2020-12-04 05:15

I see that Ansible provide some pre-defined variables that we can use in playbooks and template files. For example, the host ip address is ansible_eth0.ipv4.address. Googlei

10条回答
  •  醉酒成梦
    2020-12-04 05:39

    Note the official docs on connection configuration variables or "behavioral" variables - which aren't listed in host vars, appears to be List of Behavioral Inventory Parameters in the Inventory documentation.

    P.S. The sudo option is undocumented there (yes its sudo not ansible_sudo as you'd expect ...) and probably a couple more aren't, but thats best doc I've found on em.

提交回复
热议问题