• Ansible配置文件优先级


    [root@m01 ~]# vim /etc/ansible/ansible.cfg 
    # nearly all parameters can be overridden in ansible-playbook
    # or with command line flags. ansible will read ANSIBLE_CONFIG,
    # ansible.cfg in the current working directory, .ansible.cfg in
    # the home directory or /etc/ansible/ansible.cfg, whichever it
    # finds first
    
    [root@m01 ~]# rpm -ql ansible
    [root@m01 ~]# zcat /usr/share/man/man1/ansible-config.1.gz
    
    #要查看完整列表,请访问https://docs.ansibe.com/或使用ansibe-config命令。
    For a full list check fI\%https://docs.ansible.com/fP&. or use the fIansible-configfP command.
    
    #/etc/ansible/ansible.cfg 配置文件,如果存在则使用
    /etc/ansible/ansible.cfg -- Config file, used if present
    
    #~/.ansible.cfg 用户配置文件,覆盖默认配置(如果存在)
    ~/.ansible.cfg -- User config file, overrides the default config if present
    
    #&/ansible.cfg 本地配置文件(在当前工作目录中)假定为(aqproject-specific)(aq,如果存在,则重写其余文件)。
    &./ansible.cfg -- Local config file (in current working directory) assumed to be (aqproject specific(aq and overrides the rest if present.
    
    #如上所述,ANSIBLE_CONFIG环境变量将覆盖所有其他环境变量。
    As mentioned above, the ANSIBLE_CONFIG environment variable will override all others.

    总结:

    #生效优先级
    ANSIBLE_CONFIG >> $ANSIBLE_CONFIG/ansible.cfg >> ~/.ansible.cfg >> /etc/ansible/ansible.cfg

  • 相关阅读:
    ISC2016训练赛 phrackCTF--Classical CrackMe
    JCTF 2014 小菜一碟
    攻防世界--ReverseMe-120
    lstm torch
    pandas 处理 纽约签到数据集
    python datatime
    tf.keras 模型 多个输入 tf.data.Dataset
    python **kwarg和*args
    java 优先队列 大根堆
    python总结
  • 原文地址:https://www.cnblogs.com/chenlifan/p/13679851.html
Copyright © 2020-2023  润新知