Can I use sudo in Ansible with a "local" connection?
I give up, I just can't figure out how to use Ansible with "connection: local" + "sudo: yes". I have something like:
ansible-playbook ansible/desktop.yml
- hosts: localhost
connection: local
...
tasks:
- apt_repository: repo='ppa:alexey-smirnov/deadbeef'
sudo: yes
I have also tried sudo_user: ...
param, sudo
before the command ansible-playbook --sudo
and--ask-sudo-pass
Currently
failed: [localhost] => {"failed": true}
msg: [Errno 13] Permission denied
How should this be done?
ansible --version
ansible 1.7.2
+3
source to share