Re: [ansible-project] Failed to lock apt for exclusive operation

2020-04-18 Thread George James
inx Exists] fatal: [142.93.15.195]: FAILED! => {"msg": "Missing sudo password"} On Saturday, April 18, 2020 at 5:25:04 PM UTC+4, Stefan Hornburg (Racke) wrote: > > On 4/18/20 3:13 PM, George James wrote: > >

Re: [ansible-project] Failed to lock apt for exclusive operation

2020-04-18 Thread George James
=latest update_cache=yes loop: [ "build-essential", "libpcre3", "libpcre3-dev", "zlib1g", "zlib1g-dev", "libssl-dev", ] On Saturday, April 18, 2020 at

[ansible-project] Failed to lock apt for exclusive operation

2020-04-18 Thread George James
I create a new user using ansible called `nginx`, `nginx` is part of the sudo group a, but when I try to do an apt install with this user I get the below error ``` : FAILED! => {"changed": false, "msg": "Failed to lock apt for exclusive operation"} ``` What is the cause of the error and how c

[ansible-project] Ansible Permissions issues

2020-04-17 Thread George James
In the below playbook, I specify that ansible should run with the nginx user, but at the end when the task is run and I check in the process, I see that the last process runs with root. Also, when I try to override this by adding become nginx on that last user, the scripts stops working and eve

[ansible-project] Ansible running script with wrong user

2020-04-17 Thread George James
I have the below task in ansible, but when I take a look at the process using `ps aux | grep nginx`, I see that the process is being run by the root user instead of the nginx user is there a way I can fix this. - name: Install Nginx Ubuntu hosts: all remote_user: "{{ NGINX_USER }}" become: yes

[ansible-project] Re: Need Assistance With Ansible Error

2020-04-14 Thread George James
Thanks Orkhan, but the same issue On Wednesday, April 15, 2020 at 8:54:51 AM UTC+4, Orkhan Mammadov wrote: > > Run the file from the directory, where your config file is located. > > On Wednesday, April 15, 2020 at 7:46:36 AM UTC+4, George James wrote: >> >> I am new to

[ansible-project] Need Assistance With Ansible Error

2020-04-14 Thread George James
I am new to ansible. I create an inventory file [web] 167.172.xxx.xxx ansible_connection=ssh ansible_user=root ansible_ssh_private_key_file=~/.ssh/id_rsa.pub Then I run ansible web -m ping -i hosts - But I am presented with the following log and error ansible 2.9.6 config file = No