Modify file content.
------------------------
Create a playbook called /home/admin/ansible/modify.yml as follows:
* The playbook runs on all inventory hosts
* The playbook replaces the contents of /etc/issue with a single line of text as
follows:
--> On hosts in the dev host group, the line reads: ''Development''
--> On hosts in the test host group, the line reads: ''Test''
--> On hosts in the prod host group, the line reads: ''Production''
Suggested Answer: A
Get Premium EX294 Questions
as Interactive Web-Based Practice Test or PDF
Real Exam Format
Detailed Explanations
Instant Access
Get Your Practice Test
11 comments · newest first
FR
France
1 year ago
This is exactly what I needed for my setup!
IZ
Izetta
1 year ago
Nice, but what if a host isn't in any group?
CA
Callie
1 year ago
Wait, does it really overwrite /etc/issue? That seems risky.
DA
Daniel
1 year ago
Totally agree, this is a solid playbook.
SC
Scot
1 year ago
Looks good, but make sure to check the syntax!
SH
Shelton
1 year ago
I recall that we need to ensure the playbook runs on all hosts, but I’m not clear on how to structure the `hosts` line correctly.
JO
Johnson
1 year ago
I’m a bit confused about the syntax for the `when` condition. Did we use `inventory_hostname` or something else in the examples?
LU
Lucille
1 year ago
I practiced a similar question where we had to modify a file based on host groups, so I think I can apply that here.
LA
Larue
1 year ago
I think I remember needing to use the `copy` module, but I'm not sure if I should use `lineinfile` instead for this task.
CH
Cherry
1 year ago
I'm pretty sure the answer is C. Activity codes require skillsets to be assigned, right?
RO
Rosendo
1 year ago
Based on my understanding, the "Linux x86 with 64 bit JVM" option is the correct one. The "x86" refers to the processor architecture, and the "64 bit JVM" specifies that it's a 64-bit distribution, which is what we need for our 64-bit Linux system. I'm fairly confident in this answer.