Skip to content

Commit 6e9eb60

Browse files
committed
ansible配置参数优化
1 parent 54652ad commit 6e9eb60

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

ansible.cfg

+7-7
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ gathering = smart
3535
roles_path = /etc/ansible/roles
3636

3737
# uncomment this to disable SSH key host checking
38-
#host_key_checking = False
38+
host_key_checking = False
3939

4040
# change the default callback
4141
#stdout_callback = skippy
@@ -96,7 +96,7 @@ roles_path = /etc/ansible/roles
9696
# should not be run on a host. Set this to "False" if you don't want to see these "Skipping"
9797
# messages. NOTE: the task header will still be shown regardless of whether or not the
9898
# task is skipped.
99-
#display_skipped_hosts = True
99+
display_skipped_hosts = False
100100

101101
# by default (as of 1.3), Ansible will raise errors when attempting to dereference
102102
# Jinja2 variables that are not set in templates or action lines. Uncomment this line
@@ -173,7 +173,7 @@ roles_path = /etc/ansible/roles
173173
# You can disable this feature by setting retry_files_enabled to False
174174
# and you can change the location of the files by setting retry_files_save_path
175175

176-
#retry_files_enabled = False
176+
retry_files_enabled = False
177177
#retry_files_save_path = ~/.ansible-retry
178178

179179

@@ -210,7 +210,7 @@ roles_path = /etc/ansible/roles
210210
# ssh arguments to use
211211
# Leaving off ControlPersist will result in poor performance, so use
212212
# paramiko on older platforms rather than removing it
213-
#ssh_args = -o ControlMaster=auto -o ControlPersist=60s
213+
ssh_args = -o ControlMaster=auto -o ControlPersist=3600s
214214

215215
# The path to use for the ControlPath sockets. This defaults to
216216
# "%(directory)s/ansible-ssh-%%h-%%p-%%r", however on some systems with
@@ -221,7 +221,7 @@ roles_path = /etc/ansible/roles
221221
#
222222
# Example:
223223
# control_path = %(directory)s/%%h-%%r
224-
#control_path = %(directory)s/ansible-ssh-%%h-%%p-%%r
224+
control_path = /tmp/ansible-ssh-%%h-%%p-%%r
225225

226226
# Enabling pipelining reduces the number of SSH operations required to
227227
# execute a module on the remote server. This can result in a significant
@@ -231,7 +231,7 @@ roles_path = /etc/ansible/roles
231231
# By default, this option is disabled to preserve compatibility with
232232
# sudoers configurations that have requiretty (the default on many distros).
233233
#
234-
#pipelining = False
234+
pipelining = True
235235

236236
# if True, make ansible use scp if the connection type is ssh
237237
# (default is sftp)
@@ -240,7 +240,7 @@ roles_path = /etc/ansible/roles
240240
# if False, sftp will not use batch mode to transfer files. This may cause some
241241
# types of file transfer failures impossible to catch however, and should
242242
# only be disabled if your sftp version has problems with batch mode
243-
#sftp_batch_mode = False
243+
sftp_batch_mode = True
244244

245245
[accelerate]
246246
#accelerate_port = 5099

0 commit comments

Comments
 (0)