Bug #19257
closedResult conditions problem after "FileAugeas Set"
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