Missing become password in ansible playbook -
i trying create playbook deploy simple scenario: login server , clone/update open github repo. access parameters written in ~/.ssh/config
here files:
hosts
[staging]
staging
deploy.yml
- hosts: staging tasks: - name: update code git: repo=https://github.com/travis-ci-examples/php.git dest=hello_ansible
when trying run
ansible-playbook -s deploy.yml -i hosts
, outputs error this:
gathering facts *************************************************************** fatal: [staging] => missing become password
task: [update code] *********************************************************** fatal: no hosts matched or hosts have failed -- aborting
i have tried add sudo: false
, become: false
, not seem have effect. assume operation should not request sudo password trying work files in ssh user's home directory.
i sorry if question bit lame, not have experience ansible.
it asking sudo password because using -s option. seems not want use sudo task try running command without -s.
ansible-playbook deploy.yml -i hosts
Comments
Post a Comment