When I try to run the command:
- name: update apt-get
apt: update_cache=yes
I get:
msg: Failed to lock apt for exclusive operation
Even though my users are configured
---
- hosts: ec2
remote_user: ubuntu
sudo_user: ubuntu
sudo: yes
gather_facts: true
tasks:
and I can ssh into the machine on user ubuntu and execute apt-get update
just fine.
ubuntu@ip-172-31-29-77:~$ sudo apt-get update
....
Fetched 1,829 kB in 1s (917 kB/s)
Reading package lists... Done
how I can I use Ansible to execute this command as the user ubuntu
successfully?
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/42d2278b-90ed-4b18-af59-fcd9d0bbf9be%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.