Project

General

Profile

Actions

Bug #25764

closed

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

Added by Nagoor Shaik over 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

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.

Actions

Also available in: Atom PDF