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:

  1. hosts

    [staging]

    staging

  2. 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

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -