Project

General

Profile

Actions

Bug #19257

closed

Result conditions problem after "FileAugeas Set"

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

Status:
Resolved
Priority:
N/A
Assignee:
-
Category:
Generic methods
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
To do
Regression:
No

Description

Hello,
I created a technique to change PermitRootLogin from yes to no in the file /etc/ssh/sshd_config.
In this technique, I use the method "File Augeas set" to change the line in the file, then the method "Service Reload" to reload sshd service with the condition any.(file_augeas_setetc_ssh_sshd_config_PermitRootLoginrepaired).

The file is changed, but as the method "File Augeas set", returns "was correct" and not "Repaired".
So the repaired condition is not reached and "Service Reload" is not executed.

Rudder server 6.2.6, node client 6.2.6

Thanks.

[root@esclave03 ~]# grep PermitRootLogin /etc/ssh/sshd_config
PermitRootLogin yes

[root@esclave03 ~]# rudder agent run -i
...
2021-05-11T09:00:03+00:00 Saved 1 file(s)
E| compliant TECH_Config_sshd File Augeas set /etc/ssh/sshd_con| Setting the node value for /etc/ssh/sshdconfig/PermitRootLogin/ was correct
E| n/a TECHConfig_sshd Service reload sshd Skipping method 'Service reload' with key parameter 'sshd' since condition 'any.(file_augeas_setetc_ssh_sshd_config_PermitRootLoginrepaired)' is not reached was not applicable
...

[root@esclave03 ~]# grep PermitRootLogin /etc/ssh/sshd_config
PermitRootLogin no

Actions

Also available in: Atom PDF