Want to pass your Red Hat Certified Specialist in Ansible Automation EX407 exam in the very first attempt? Try Pass2lead! It is equally effective for both starters and IT professionals.
VCE
Create a playbook called issue.yml in /home/sandy/ansible which changes the file /etc/issue on all managed nodes: If host is a member of (lev then write "Development" If host is a member of test then write "Test" If host is a member of prod then write "Production"
Consider the following playbook.
-hosts: web1 become: yes
tasks:
-
name: use yum yum: name=httpd
state=latest
-
name: use service service: name=httpd state=started enabled=yes
-hosts: media1 become: yes
tasks:
-name: use service service: name=mariadb state=started
when:
-ansible_hostname == "web1"
-name: use service service: name=firewalld state=stopped
What service is started on the host media1?
A. mariadb
B. httpd
C. firewalld
D. No service is started on media1.
Where is the first place Ansible checks for a role definition?
A. ${PWD}/roles
B. Ansible must always be told where to look for a role.
C. ${PWD}/.roles
D. /etc/ansible/roles