少しハマったのでメモ。「–ask-become-pass」に変更すればOK

旧→ $ ansible-playbook playbook.yml -i hosts/test -l all --ask-sudo-pass
新→ $ ansible-playbook playbook.yml -i hosts/test -l all --ask-become-pass

ついでに、CentOS7の「yum install ansible」でないと怒られる。
epelに移った?みたい。(CentOS6は元からepel?)

追加→ # yum -y install epel-release
# yum -y install ansible


$ ansible-playbook playbook.yml -i hosts/test -l all --ask-sudo-pass
 [WARNING] Ansible is being run in a world writable directory (/vagrant/ansible), ignoring it as an ansible.cfg source. For more information see https://docs.ansible.com/ansible/devel/reference_appendices/config.html#cfg-in-world-writable-dir
usage: ansible-playbook [-h] [--version] [-v] [-k]
                        [--private-key PRIVATE_KEY_FILE] [-u REMOTE_USER]
                        [-c CONNECTION] [-T TIMEOUT]
                        [--ssh-common-args SSH_COMMON_ARGS]
                        [--sftp-extra-args SFTP_EXTRA_ARGS]
                        [--scp-extra-args SCP_EXTRA_ARGS]
                        [--ssh-extra-args SSH_EXTRA_ARGS] [--force-handlers]
                        [--flush-cache] [-b] [--become-method BECOME_METHOD]
                        [--become-user BECOME_USER] [-K] [-t TAGS]
                        [--skip-tags SKIP_TAGS] [-C] [--syntax-check] [-D]
                        [-i INVENTORY] [--list-hosts] [-l SUBSET]
                        [-e EXTRA_VARS] [--vault-id VAULT_IDS]
                        [--ask-vault-pass | --vault-password-file VAULT_PASSWORD_FILES]
                        [-f FORKS] [-M MODULE_PATH] [--list-tasks]
                        [--list-tags] [--step] [--start-at-task START_AT_TASK]
                        playbook [playbook ...]
ansible-playbook: error: unrecognized arguments: --ask-sudo-pass
# yum -y install ansible
読み込んだプラグイン:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: ty1.mirror.newmediaexpress.com
 * extras: ty1.mirror.newmediaexpress.com
 * updates: ty1.mirror.newmediaexpress.com
パッケージ ansible は利用できません。

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です