# config file for ansible -- http://ansible.com/
# ==============================================
[defaults]
# some basic default values...
#inventory = /etc/ansible/hosts #這個事默認(rèn)庫文件位置,腳本,或者存放可通信主機的目錄
#library = /usr/share/my_modules/ #這個事Ansible默認(rèn)搜尋模塊的位置
#module_utils = /usr/share/my_module_utils/
#remote_tmp = ~/.ansible/tmp
#local_tmp = ~/.ansible/tmp
#forks = 5 #連接主機的并發(fā)數(shù)
#poll_interval = 15 #對于Ansible中的異步任務(wù)(詳見 異步操作和輪詢), 這個是設(shè)置定義,當(dāng)具體的poll interval 沒有定義時,多少時間回查一下這些任務(wù)的狀態(tài), 默認(rèn)值是一個折中選擇15秒鐘.這個時間是個回查頻率和任務(wù)完成叫回頻率和當(dāng)任務(wù)完成時的回轉(zhuǎn)頻率的這種:
#sudo_user = root
#ask_sudo_pass = True #ask_pass,用來控制Ansible playbook 在執(zhí)行sudo之前是否詢問sudo密碼.默認(rèn)為no
#ask_pass = True #個可以控制,Ansible 劇本playbook 是否會自動默認(rèn)彈出彈出密碼.默認(rèn)為no
#transport = smart
#remote_port = 22 #ssh連接端口
#module_lang = C #這是默認(rèn)模塊和系統(tǒng)之間通信的計算機語言,默認(rèn)為’C’語言.
#module_set_locale = False
#gathering = implicit #控制默認(rèn)facts收集(遠程系統(tǒng)變量). 默認(rèn)值為’implicit’, 每一次play,facts都會被收集
#gather_subset = all
# gather_timeout = 10
#roles_path = /etc/ansible/roles #roles 路徑指的是’roles/’下的額外目錄,用于playbook搜索Ansible roles
#host_key_checking = False #檢查主機密鑰
# change the default callback
#stdout_callback = skippy
# enable additional callbacks
#callback_whitelist = timer, mail
#task_includes_static = True
#handler_includes_static = True
#error_on_missing_handler = True
#sudo_exe = sudo #如果在其他遠程主機上使用另一種方式執(zhí)行sudo草做, sudo程序的路徑可以用這個參數(shù)更換,使用命令行標(biāo)簽來擬合標(biāo)準(zhǔn)
#sudo_flags = -H -S -n #當(dāng)使用sudo支持的時候,傳遞給sudo而外的標(biāo)簽. 默認(rèn)值為”-H”, 意思是保留原用戶的環(huán)境.在有些場景下也許需要添加或者刪除 標(biāo)簽,大多數(shù)用戶不需要修改
#timeout = 10 #SSH超時時間
#remote_user = root #使用/usr/bin/ansible-playbook鏈接的默認(rèn)用戶名,如果不指定,會使用當(dāng)前登錄的用戶名
#log_path = /var/log/ansible.log # 日志文件存放路徑
#module_name = command #ansible命令執(zhí)行默認(rèn)的模塊
#executable = /bin/sh #在sudo環(huán)境下產(chǎn)生一個shell交互接口. 用戶只在/bin/bash的或者sudo限制的一些場景中需要修改
#hash_behaviour = replace # 特定的優(yōu)先級覆蓋變量
#private_role_vars = yes
#jinja2_extensions = jinja2.ext.do,jinja2.ext.i18n #允許開啟Jinja2拓展模塊
#private_key_file = /path/to/file #如果你是用pem密鑰文件而不是SSH 客戶端或秘密啊認(rèn)證的話,你可以設(shè)置這里的默認(rèn)值,來避免每一次提醒設(shè)置密鑰文件位置
#vault_password_file = /path/to/vault_password_file
#ansible_managed = Ansible managed #這個設(shè)置可以告知用戶,Ansible修改了一個文件,并且手動寫入的內(nèi)容可能已經(jīng)被覆蓋.
#display_skipped_hosts = True # 顯示任何跳過任務(wù)的狀態(tài) ,默認(rèn)是顯示
#display_args_to_stdout = False #顯示任何跳過任務(wù)的狀態(tài) ,默認(rèn)是顯示
#error_on_undefined_vars = False #如果所引用的變量名稱錯誤的話, 將會導(dǎo)致ansible在執(zhí)行步驟上失敗
#system_warnings = True #允許禁用系統(tǒng)運行ansible相關(guān)的潛在問題警告
#deprecation_warnings = True #允許在ansible-playbook輸出結(jié)果中禁用“不建議使用”警告
# command_warnings = False #當(dāng)shell和命令行模塊被默認(rèn)模塊簡化的時,Ansible 將默認(rèn)發(fā)出警告
#action_plugins = /usr/share/ansible/plugins/action #“行為”是 ansible中的一段代碼,用來激活一些事件,例如執(zhí)行一個模塊,一個模版,等等;這是一個以開發(fā)者為中心的特性,使得一些底層模塊可以從外部不同地方加載
#cache_plugins = /usr/share/ansible/plugins/cache
#callback_plugins = /usr/share/ansible/plugins/callback
#connection_plugins = /usr/share/ansible/plugins/connection
#lookup_plugins = /usr/share/ansible/plugins/lookup
#inventory_plugins = /usr/share/ansible/plugins/inventory
#vars_plugins = /usr/share/ansible/plugins/vars
#filter_plugins = /usr/share/ansible/plugins/filter
#test_plugins = /usr/share/ansible/plugins/test
#strategy_plugins = /usr/share/ansible/plugins/strategy
#strategy = free
#bin_ansible_callbacks = False #用來控制callback插件是否在運行 /usr/bin/ansible 的時候被加載. 這個模塊將用于命令行的日志系統(tǒng),發(fā)出通知等特性
#nocows = 1 #默認(rèn)ansible可以調(diào)用一些cowsay的特性 開啟/禁用:0/1
#cow_selection = default
#cow_selection = random
#nocolor = 1 #輸出帶上顏色區(qū)別, 開啟/關(guān)閉:0/1
#fact_caching = memory
#retry_files_enabled = False
#retry_files_save_path = ~/.ansible-retry
#no_log = False
#no_target_syslog = False
#allow_world_readable_tmpfiles = False
#var_compression_level = 9
#module_compression = 'ZIP_DEFLATED'
#max_diff_size = 1048576
#merge_multiple_cli_flags = False
# Controls showing custom stats at the end, off by default
#show_custom_stats = True
#inventory_ignore_extensions = ~, .orig, .bak, .ini, .cfg, .retry, .pyc, .pyo
[privilege_escalation]
#become=True
#become_method=sudo
#become_user=root
#become_ask_pass=False
[paramiko_connection]
#record_host_keys=False
#pty=False
[ssh_connection]
#ssh_args = -C -o ControlMaster=auto -o ControlPersist=60s
# control_path_dir = /tmp/.ansible/cp
#control_path_dir = ~/.ansible/cp
# control_path = %(directory)s/%%h-%%r
#control_path =
#pipelining = False
# Control the mechanism for transferring files (old)
# * smart = try sftp and then try scp [default]
# * True = use scp only
# * False = use sftp only
#scp_if_ssh = smart
#transfer_method = smart
#sftp_batch_mode = False
[accelerate]
#accelerate_port = 5099 #在急速模式下使用的端口
#accelerate_timeout = 30
#accelerate_connect_timeout = 5.0
# The daemon timeout is measured in minutes. This time is measured
# from the last activity to the accelerate daemon.
#accelerate_daemon_timeout = 30
#accelerate_multi_key = yes
[selinux]
#libvirt_lxc_noseclabel = yes
[colors]
#highlight = white
#verbose = blue
#warn = bright purple
#error = red
#debug = dark gray
#deprecate = purple
#skip = cyan
#unreachable = red
#ok = green
#changed = yellow
#diff_add = green
#diff_remove = red
#diff_lines = cyan
[diff]
# Always print diff when running ( same as always running with -D/--diff )
# always = no
# Set how many context lines to show in diff
# context = 3
另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)scvps.cn,海內(nèi)外云服務(wù)器15元起步,三天無理由+7*72小時售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國服務(wù)器、虛擬主機、免備案服務(wù)器”等云主機租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務(wù)可用性高、性價比高”等特點與優(yōu)勢,專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場景需求。