Project

General

Profile

Bug #25764

Ansible Job Templates fails because sudo password is not provided even though it is

Added by Nagoor Shaik over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:

Description

Description of problem:

Ansible job template shows fatal: [client.example.com]: FAILED! => {"changed": false, "module_stderr": "Shared connection to client.example.com closed.\r\n", "module_stdout": "sudo: a password is required\r\n", "msg": "MODULE FAILURE", "rc": 1}

even though Sudo password is defined in Administer > settings > Remote Execution

This works if we use any other template except ansible (eg - Run command - SSH template)

Version-Release number of selected component (if applicable):
satellite 6.4

Steps to Reproduce:
1. Create user demo on the client system and add it in the sudoers file
2. On satellite in Administer > settings > Remote Execution.

SSH User = demo
Sudo password = password of Demo
Effective User = test

3. Run job from satellite to client using any ansible template.

Actual results:
Fails with error

[client.example.com]: FAILED! => {"changed": false, "module_stderr": "Shared connection to client.example.com closed.\r\n", "module_stdout": "sudo: a password is required\r\n", "msg": "MODULE FAILURE", "rc": 1}

Expected results:
Should successfully execute.

Associated revisions

Revision 911b1b95 (diff)
Added by Nagoor Shaik over 1 year ago

Fixes #25764 - add ansible_sudo_pass during inventory creation (#231)

History

#1 Updated by The Foreman Bot over 1 year ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman_ansible/pull/231 added

#2 Updated by The Foreman Bot over 1 year ago

  • Assignee set to Adam Ruzicka
  • Pull request https://github.com/theforeman/foreman_ansible/pull/232 added

#3 Updated by Adam Ruzicka over 1 year ago

  • Pull request deleted (https://github.com/theforeman/foreman_ansible/pull/232)

#4 Updated by Marek Hulán over 1 year ago

  • Fixed in Releases foreman-ansible 2.3.1 added

#5 Updated by Nagoor Shaik over 1 year ago

  • Status changed from Ready For Testing to Closed

#6 Updated by Marek Hulán over 1 year ago

  • Fixed in Releases foreman-ansible 2.2.13 added
  • Fixed in Releases deleted (foreman-ansible 2.3.1)

Also available in: Atom PDF