Ansible で sudo が Deprecated になったので become を使うようにしたよ


ansible-playbook をいつもみたいに流してたら DEPRECATION WARNING が出るようになった

[DEPRECATION WARNING]: Instead of sudo/sudo_user, use become/become_user and make sure become_method is 'sudo' (default). This feature will be removed in a future release. Deprecation warnings can be disabled by setting
deprecation_warnings=False in ansible.cfg.

もうその属性は流行らねーから become 使えやってことらしい。

- hosts: all
sudo: yes

- hosts: all
become: yes

become_methodsudo はデフォルトでつくらしいのでつけなくてもよし。


  1. Ansible1.9からはsudo/suの代わりにbecomeを使う – Qiita

Sponsored Link

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.