1

I created a RHEL7 VM and a OS Policy assignment with a simple config. Here is the YAML I'm using to validate. Below is the same shell script used in yaml for reference:

export num=$(stat --format '%a' /etc/crontab); if [[ "$num" -eq 644 ]]; then exit 100; else exit 101; fi

Since I get the output 644 when I SSH and manually try the command, I'm checking the same with this script and after validating, it should give compliant state as result but it's giving non-compliant.

PS: I was getting correct output i.e. compliant 3 days ago but nothing is working now. It seems google is making changes as the service still in Preview.

Pit
  • 736
  • 3
  • 17
  • Hi @Utkarsh, Check whether every policy is compliant in the Vm instance. If one policy is non-compliant, the overall state of the VM results in non-compliant state. – Srividya Aug 17 '21 at 17:23
  • Hi @Srividya, I was only testing with one policy and that was compliant, still it wasn't reflecting. Good thing is, I've resolved the issue and it was due to the missing routes in default vpc. Thanks for your reply anyways :) – Utkarsh Sharma Aug 18 '21 at 08:25
  • can you share the steps as an answer that actually worked for you to help the larger forum facing similar issue. – Srividya Aug 18 '21 at 09:53

0 Answers0