1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Ansible で DEFAULT_SUDO_FLAGS から DEFAULT_BECOME_FLAGS に 変更

Last updated at Posted at 2019-04-29

SUDO_FLAG は 非推奨の Warning が 出た場合

Warning
[DEPRECATION WARNING]: DEFAULT_SUDO_FLAGS option, In favor of Ansible Become, which is a generic framework. See become_flags. , use become instead.
This feature will be removed in version 2.8. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.

/etc/ansible/ansible.cfg を 変更してください。

ansible.cfg
*** sudo_flgas を コメントアウト ***

# What flags to pass to sudo
# WARNING: leaving out the defaults might create unexpected behaviours
#sudo_flags = -H -S -n

*** become_flags を 追記(もしくはコメント解除) ***

[privilege_escalation]
・・・
become_flags = -H -S -n

Warning が でないことを確認

確認コマンド
# ansible-config dump --only-changed
・・・
DEFAULT_BECOME_FLAGS(/etc/ansible/ansible.cfg) = -H -S -n
・・・
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?