Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ansible installation: error using --ask-become-pass #22

Closed
calbasi opened this issue Jan 23, 2022 · 7 comments
Closed

Ansible installation: error using --ask-become-pass #22

calbasi opened this issue Jan 23, 2022 · 7 comments

Comments

@calbasi
Copy link
Contributor

calbasi commented Jan 23, 2022

Hi, when using:

ansible-playbook -i inventory/hosts lemmy.yml --ask-become-pass

I get an error (the typical error on Debian when a user without privileges try to do an apt update:

TASK [install python for Ansible] ****************************************************************************************************
fatal: [joan@collapse.cat]: FAILED! => {"changed": true, "msg": "non-zero return code", "rc": 100, "stderr": "Shared connection to collapse.cat closed.\r\n", "stderr_lines": ["Shared connection to collapse.cat closed."], "stdout": "\rS'està llegint la llista de paquets… 0%\r\rS'està llegint la llista de paquets… 100%\r\rS'està llegint la llista de paquets… Fet \r\r\n\u001b[1;31mE: \u001b[0mNo s'ha pogut obrir el fitxer de blocat /var/lib/apt/lists/lock - open (13: S’ha denegat el permís)\u001b[0m\r\n\u001b[1;31mE: \u001b[0mNo es pot blocar el directori /var/lib/apt/lists/\u001b[0m\r\n\u001b[1;33mW: \u001b[0mHi ha hagut un problema en desenllaçar el fitxer /var/cache/apt/pkgcache.bin - RemoveCaches (13: S’ha denegat el permís)\u001b[0m\r\n\u001b[1;33mW: \u001b[0mHi ha hagut un problema en desenllaçar el fitxer /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: S’ha denegat el permís)\u001b[0m\r\n", "stdout_lines": ["", "S'està llegint la llista de paquets… 0%", "", "S'està llegint la llista de paquets… 100%", "", "S'està llegint la llista de paquets… Fet ", "", "\u001b[1;31mE: \u001b[0mNo s'ha pogut obrir el fitxer de blocat /var/lib/apt/lists/lock - open (13: S’ha denegat el permís)\u001b[0m", "\u001b[1;31mE: \u001b[0mNo es pot blocar el directori /var/lib/apt/lists/\u001b[0m", "\u001b[1;33mW: \u001b[0mHi ha hagut un problema en desenllaçar el fitxer /var/cache/apt/pkgcache.bin - RemoveCaches (13: S’ha denegat el permís)\u001b[0m", "\u001b[1;33mW: \u001b[0mHi ha hagut un problema en desenllaçar el fitxer /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: S’ha denegat el permís)\u001b[0m"]}

But the error is gone when using:

ansible-playbook -i inventory/hosts lemmy.yml --become -K

@dessalines
Copy link
Member

You mean we just need to change the README, if the second command works?

@calbasi
Copy link
Contributor Author

calbasi commented Jan 25, 2022

Yes. I'm not an advanced Ansible user, and I don't know what's the difference between both commands and why one runs and the other sucks.

dessalines added a commit that referenced this issue Jan 26, 2022
@Nutomic
Copy link
Member

Nutomic commented Jan 26, 2022

Did you change anything in ansible.cfg? It sets become = True, so there should be no need to set it on command line.

@calbasi
Copy link
Contributor Author

calbasi commented Jan 26, 2022

I didn't change anything in change.cfg. I just did a "git pull" and fired ansible command.

@Nutomic
Copy link
Member

Nutomic commented Jan 27, 2022

Weird. Maybe setting the command line parameter causes the config to be ignored or something like that.

@calbasi
Copy link
Contributor Author

calbasi commented Feb 10, 2022

Hi @Nutomic why have you dischard "-K" from my suggested command?

@dessalines
Copy link
Member

K is the same as ask become pass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants