Project

General

Profile

Actions

Bug #19157

closed

Command "rudder agent policy-server <server ip>" return code = 1 when ok

Added by Axel Bouet over 3 years ago. Updated over 3 years ago.

Status:
Released
Priority:
N/A
Category:
Agent
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
Checked
Regression:

Description

Hello,
During an ansible development, I could see that the command "rudder agent policy-server <server ip>" returns the code 1 while the command worked well.

---
[root@server01 ~]# rudder agent policy-server 10....
[root@server01 ~]# echo $?
1
---

So ansible concider that the command failed.
I found two possibilities :

- change the logic of ansible with failed_when / changed_when

- modify the file /opt/rudder/share/commands/agent-policy-server and add "|| exit 0" at the end of the last line
---
[ $? ne 0 ] && printf "${RED}error${NORMAL}: Could not set policy server\n" || exit 0
--

Thanks.

Actions

Also available in: Atom PDF