ansible.legacy.setup failed to execute
timur-khakhalev opened this issue · 1 comments
timur-khakhalev commented
Describe the bug
Hi. Im using your app is about 2-3 months, have 5 users in config, everything works good. Now I want to add a new user.
To Reproduce
Steps to reproduce the behavior:
- I added a new user in config.cfg
source .env/bin/activate
./algo update-users
- And on this step I got a error, but I have never encountered such an error:
Full log
~/algo on master !1 ❯ ./algo update-users ✘ INT .env with timur@vps at 15:46:18
[WARNING]: Found variable using reserved name: no_log
PLAY [localhost] *********************************************************************************************************************************
TASK [Get list of installed config files] ********************************************************************************************************
ok: [localhost]
TASK [Verify servers] ****************************************************************************************************************************
ok: [localhost] => {
"changed": false,
"msg": "All assertions passed"
}
TASK [Build list of installed servers] ***********************************************************************************************************
ok: [localhost]
[Server address prompt]
Select the server to update user list below:
1. localhost
:
1^M
TASK [Server address prompt] *********************************************************************************************************************
ok: [localhost]
TASK [Set facts based on the input] **************************************************************************************************************
ok: [localhost]
TASK [Import host specific variables] ************************************************************************************************************
ok: [localhost]
[CA password prompt]
Enter the password for the private CA key (output is hidden):
TASK [CA password prompt] ************************************************************************************************************************
ok: [localhost]
TASK [Set facts based on the input] **************************************************************************************************************
ok: [localhost]
--> Please include the following block of text when reporting issues:
Algo running on: Ubuntu 20.04.4 LTS (Virtualized: kvm)
Created from git clone. Last commit: a43de09 Remove dead link to centos docs (#14488)
Python 3.8.10
Runtime variables:
algo_provider "local"
algo_ondemand_cellular "True"
algo_ondemand_wifi "True"
algo_ondemand_wifi_exclude "X251bGw="
algo_dns_adblocking "False"
algo_ssh_tunneling "False"
wireguard_enabled "True"
dns_encryption "True"
TASK [Display the invocation environment] ********************************************************************************************************
changed: [localhost]
TASK [Install the requirements] ******************************************************************************************************************
ok: [localhost]
TASK [Add the server to the vpn-host group] ******************************************************************************************************
changed: [localhost]
PLAY [User management] ***************************************************************************************************************************
TASK [Gathering Facts] ***************************************************************************************************************************
fatal: [localhost]: FAILED! => {"ansible_facts": {}, "changed": false, "failed_modules": {"ansible.legacy.setup": {"failed": true, "module_stderr": "sudo: a password is required\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}}, "msg": "The following modules failed to execute: ansible.legacy.setup\n"}
PLAY RECAP ***************************************************************************************************************************************
localhost : ok=11 changed=2 unreachable=0 failed=1 skipped=3 rescued=0 ignored=0
~/algo on master !1 ❯ ansible --version ✘ INT .env with timur@vps at 15:49:39
ansible [core 2.12.3]
config file = /home/timur/algo/ansible.cfg
configured module search path = ['/home/timur/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/timur/algo/.env/lib/python3.8/site-packages/ansible
ansible collection location = /home/timur/.ansible/collections:/usr/share/ansible/collections
executable location = /home/timur/algo/.env/bin/ansible
python version = 3.8.10 (default, Jun 22 2022, 20:18:18) [GCC 9.4.0]
jinja version = 3.0.3
libyaml = True
What I did wrong?
timur-khakhalev commented
Okay this solved the problem