ceuser@deyu:~/ansible_pb$ cat /etc/ansible/ansible.cfg # Since Ansible 2.12 (core): # To generate an example config file (a "disabled" one with all default settings, commented out): # $ ansible-config init --disabled > ansible.cfg # # Also you can now have a more complete file by including existing plugins: # ansible-config init --disabled -t all > ansible.cfg # For previous versions of Ansible you can check for examples in the 'stable' branches of each version # Note that this file was always incomplete and lagging changes to configuration settings # for example, for 2.9: https://github.com/ansible/ansible/blob/stable-2.9/examples/ansible.cfg
ceuser@deyu:~/ansible_pb$ ansible-config init --disabled > ansible.cfg
[...] 為章節,目前只需設定 [default] 章節的變數,# 開頭為說明,; 開頭為變數設定預設並註解。
ceuser@deyu:~/ansible_pb$ grep -Ev '^(#|$|;)' ansible.cfg [defaults] [privilege_escalation] [persistent_connection] [connection] [colors] [selinux] [diff] [galaxy] [inventory] [netconf_connection] [paramiko_connection] [jinja2] [tags]