RHEL8-packages-CIS_Benchmark-playbook

25 views
Skip to first unread message

Himanshu Kaushik

unread,
Jun 20, 2023, 9:44:06 AM6/20/23
to Ansible Project
Hi,

Greetings!

Can anyone please help me if my playbook is correct or not.
Also, please help it correct and it should run / execute correctly and it should make the necessary changes in the RHEL8 slave VM and make the required changes and do the required updates as mentioned in the tasks 1.1, 2.1, 3.1 etc.

Please check the playbook in the attachment in below link:

please find the links that I have taken for references below:

Any help would be deeply appreciated.

Thanks.

Evan Hisey

unread,
Jun 20, 2023, 10:01:29 AM6/20/23
to ansible...@googlegroups.com
Looks like you are missing the entire start of a playbook. Is this a role or an include? If not need to set up the header section (hosts, connection, gather_facts, etc) and tasks section.

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/956f5c99-49a4-428c-9a79-689e8346b41bn%40googlegroups.com.

Dick Visser

unread,
Jun 20, 2023, 12:48:44 PM6/20/23
to ansible...@googlegroups.com
On Tue, 20 Jun 2023 at 15:44, Himanshu Kaushik <himanshuk...@gmail.com> wrote:

Can anyone please help me if my playbook is correct or not.

That totally depends on what your interpretation is of "correct".
I doubt posting a 2000 line playbook and asking if it "is correct" is going to get a useful response.
I'm definitely not going to go through it :p

 
Also, please help it correct and it should run / execute correctly and it should make the necessary changes in the RHEL8 slave VM and make the required changes and do the required updates as mentioned in the tasks 1.1, 2.1, 3.1 etc.
 
This list is more geared towards specific problems related to ansible. You seem to be looking for some high level patching strategy, which is outside the scope of this list (I think).
It's better to come up with specific questions, such as an error that you don't understand, a task doesn't do what you expect, etc.

Dick

Himanshu Kaushik

unread,
Jun 26, 2023, 9:06:27 AM6/26/23
to Ansible Project
Hi,

Evan coming to your reply regarding the header section (hosts, connection, gather_facts, etc) and tasks section. this all I've included in another playbook and calling this bigger playbook from that test playbook. so, basically I've included the header section and everything in a small playbook also, I've used  ansible.builtin.include:
module and included this bigger playbook (i.e. https://github.com/himanshukaushik16/ansible/blob/main/cis_rhel8_testing.yml) in the smaller playbook.

So, I'm actually looking for what I can do in this playbook. I've checked the indentation and it's correct but still getting error for indentation. can anyone please look into this and help me out.


Dick thanks buddy but I guess I'm facing this issue not any specific error because it's showing indentation error and sometimes it's something else but my question is how can I correct this playbook and how can I get the report and see the changes done by running this playbook. It would be so great of you if you can help me with this.

Evan Hisey

unread,
Jun 26, 2023, 10:13:16 AM6/26/23
to ansible...@googlegroups.com
On Mon, Jun 26, 2023 at 8:06 AM Himanshu Kaushik <himanshuk...@gmail.com> wrote:
Hi,

Evan coming to your reply regarding the header section (hosts, connection, gather_facts, etc) and tasks section. this all I've included in another playbook and calling this bigger playbook from that test playbook. so, basically I've included the header section and everything in a small playbook also, I've used  ansible.builtin.include:
module and included this bigger playbook (i.e. https://github.com/himanshukaushik16/ansible/blob/main/cis_rhel8_testing.yml) in the smaller playbook.

So, I'm actually looking for what I can do in this playbook. I've checked the indentation and it's correct but still getting error for indentation. can anyone please look into this and help me out.
 
All right, what line is it saying the error is at. copy pasting all that code into a single play is a pain. I tried it one before and found it was easier to just rewrite and get rid of all the tags and switches the the Lock Down project was using if I was not going use their playbooks and roles.

 

Dick thanks buddy but I guess I'm facing this issue not any specific error because it's showing indentation error and sometimes it's something else but my question is how can I correct this playbook and how can I get the report and see the changes done by running this playbook. It would be so great of you if you can help me with this.
On Tuesday, June 20, 2023 at 10:18:44 PM UTC+5:30 Dick Visser wrote:
On Tue, 20 Jun 2023 at 15:44, Himanshu Kaushik <himanshuk...@gmail.com> wrote:

Can anyone please help me if my playbook is correct or not.

That totally depends on what your interpretation is of "correct".
I doubt posting a 2000 line playbook and asking if it "is correct" is going to get a useful response.
I'm definitely not going to go through it :p

 
Also, please help it correct and it should run / execute correctly and it should make the necessary changes in the RHEL8 slave VM and make the required changes and do the required updates as mentioned in the tasks 1.1, 2.1, 3.1 etc.
 
This list is more geared towards specific problems related to ansible. You seem to be looking for some high level patching strategy, which is outside the scope of this list (I think).
It's better to come up with specific questions, such as an error that you don't understand, a task doesn't do what you expect, etc.

Dick

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages