Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Sudo error output obtained in stdout for command fact #420

Open
chambridge opened this issue Oct 27, 2017 · 0 comments
Open

Sudo error output obtained in stdout for command fact #420

chambridge opened this issue Oct 27, 2017 · 0 comments

Comments

@chambridge
Copy link

Specify type:

  • Bug

Bug severity (if applicable):

  • Medium

Description:

Different systems are not failing the ansible task when attempting to perform a command using sudo. We also hit an issue where sudo as a command doesn't even exist.

"Sorry, user htsvc is not allowed to execute '/bin/sh -c echo BECOME-SUCCESS-<value>; /usr/sbin/dmidecode -t 4 | grep 'Socket Designation'| wc -l' as root on 1.2.3.5."

"sh: sudo: not found"


Bug Report

Version of rho:

[ 0.28, 0.29 ]

Expected behavior:

Provide a more user friendly error for the output and appropriately adjust any dependent code to handle the sudo failure as a true failure.

Actual behavior:

Facts contain output information about sudo failure, but are also used in logical decisions further on in other playbooks.

May need to add stderr redirect to /dev/null for any sudo command (assuming theses are stderr outputs).

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

No branches or pull requests

1 participant