Can I use sudo in Ansible with connection "local"? -



Can I use sudo in Ansible with connection "local"? -

i give up, can't understand how utilize ansible "connection: local" + "sudo: yes". have like:

ansible-playbook ansible/desktop.yml - hosts: localhost connection: local ... tasks: - apt_repository: repo='ppa:alexey-smirnov/deadbeef' sudo: yes

i've tried sudo_user: ... param, sudo before command, ansible-playbook --sudo , --ask-sudo-pass

currently:

failed: [localhost] => {"failed": true} msg: [errno 13] permission denied

how should executed?

ansible --version ansible 1.7.2

try

ansible-playbook -i <inventory> ansible/desktop.yml -u <local user can sudo password> --ask-sudo-pass

this create ansible utilize remote user mentioned in -u. , when uses user sudo, inquire sudo password.

ansible

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -