Create a playbook called timesvnc.yml in/home/sandy/ansible using rhel system role timesync. Set the time to use currently configured nip with the server 0.uk.pool.ntp.org. Enable burst. Do this on all hosts.
Create a file called mysecret.yml on the control host using ansible vault in home/bob/ansible. Set the password to 'notasafepass' and inside the file create a variable called dev_pass with the value of devops. Save the file. Then go back in the file and change dev_pass value to devops123. Then change the vault password of mysecret.yml to verysafepass
Examine the following inventory excerpt file named /home/user/ansible/inventory. [dbservers] db1.example.com Which of the following files does Ansible check for variables related to that inventory? (Choose all that apply.)
A. /home/user/ansible/dbservers
B. /home/user/ansible/host_vars/db1.example.com
C. /home/user/ansible/host_vars/db1
D. /home/user/ansible/group_vars/dbservers
Which command will allow you to collect all facts for the specific host group 'labmachines'?
A. ansible -c setup labmachines
B. ansible-gather-facts labmachines
C. ansible labmachines -m facts
D. ansible labmachines -m setup
An Ansible inventory may contain which of the following? (Choose all that apply.)
A. Variable declarations
B. Groups
C. Hosts
D. Plays
What switch needs to be added to prevent the following command from failing: ansible all -m user -a "name=jsmith state=present"
A. -b
B. -f
C. -x
D. -v
Is there a syntax error in the following excerpt? If so, what is it?
vars: package: httpd tasks:
-
name: Deploy {{ package }}
yum:
name:
{{ package }}
state: present
A.
No, there are no syntax errors in the provided excerpt.
B.
Yes, the variable package is not defined correctly.
C.
Yes, the name parameter for the yum module should have a quoted value.
D.
Yes, the name keyword (below tasks) should have a quoted value.
What attribute allows you to cause a play to stop based on a certain failure threshold?
A. failure_threshold
B. serial
C. acceptable_failure_percentage
D. max_fail_percentage
State whether the following statement is true or false. A template has a maximum of 10 variables.
A. True
B. False