LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-03-2019, 08:51 PM   #1
TechnoJunky
Member
 
Registered: Aug 2007
Location: Illinois (NW Chicago burbs)
Distribution: Fedora
Posts: 86

Rep: Reputation: 1
Ansible errors with incorrect sudo password


This was previously working, but about a month ago, after an update, it stopped. This is for my home network. I have 3 Kubuntu computers, 1 working as a server, with Ansible installed, 2 client workstations.

THis is the error message - "fatal: [desktop1]: FAILED! => {"msg": "Incorrect sudo password"}"

I can log into all 3 computers with the same ID and same password. Once there I can run 'sudo apt-get update (or upgrade), on all 3.
I setup passwordless SSH keys on each of computers. I can ssh into the server and then ssh into each of the clients from the server.
On the server, in my home directory, I have a folder called playbooks. In it I have 3 files. 1 - update.yml, 2 - update.sh, 3 - secret.

When I run 'ansible-vault edit secret', I can see 'ansible_sudo_pass: xxxxxxx' (xxxxxx replaces my real password).

update.sh contains only 1 line: 'ansible-playbook update.yml --ask-vault-pass'. When I run this, it asks for the vault password, then shows the task names where it errors out.

update.yml contains the following lines:
---

- name: Update Apps
hosts: kubuntu

vars_files:
- secret

tasks:
- name: Update Cache
become: true
apt:
force_apt_get: yes
update_cache: yes

- name: Apt-get dist-upgrade
become: true
apt:
force_apt_get: yes
upgrade: dist
autoclean: yes
autoremove: yes

Like I said, this used to work, now I get the sudo password error. Can someone help me figure this out?
 
Old 02-13-2023, 10:01 AM   #2
TechnoJunky
Member
 
Registered: Aug 2007
Location: Illinois (NW Chicago burbs)
Distribution: Fedora
Posts: 86

Original Poster
Rep: Reputation: 1
Follow up. I had to recreate the secret file, worked after that.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Ansible Guide: Manage Files using Ansible LXer Syndicated Linux News 0 04-26-2019 10:32 AM
LXer: Ansible Guide: Create Ansible Playbook for LEMP Stack LXer Syndicated Linux News 0 04-13-2019 05:03 AM
LXer: Ansible Tutorial: Introduction to simple Ansible commands LXer Syndicated Linux News 0 05-21-2018 10:28 AM
LXer: Ansible Tutorial: Intorduction to simple Ansible commands LXer Syndicated Linux News 0 01-14-2018 05:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration