EX407 Exam Question 26
Create a file calledrequirements.ymlin/home/sandy/ansible/rolesa file calledrole.yml in
/home/sandy/ansible/.Thehaproxy-roleshould be used on theproxyhost. And when you curl
http://node3.example.comit should display "Welcome tonode4.example.com" and when you curl again
"Welcome tonode5.example.com"Thephp-roleshould be used on theprodhost.
/home/sandy/ansible/.Thehaproxy-roleshould be used on theproxyhost. And when you curl
http://node3.example.comit should display "Welcome tonode4.example.com" and when you curl again
"Welcome tonode5.example.com"Thephp-roleshould be used on theprodhost.
EX407 Exam Question 27
Consider the following playbook:
# playbook name: /home/ansible/web.yml
---
- hosts: webservers
become: yes
tasks:
- name: edit file 1
lineinfile:
path: /var/www/content.hml line: "{{ text }}" tags:
- content
- name: edit file 2
lineinfile: path: /var/www/index.hml
line: "{{ text }}"
tags:
- web
- name: edit file 3
lineinfile:
path: /var/www/etc.hml
line: "{{ text }}"
tags: - content - misc
Which use of the ansible-playbook command on the provided playbook will result in ONLY editing the file / var/www/index.html?
# playbook name: /home/ansible/web.yml
---
- hosts: webservers
become: yes
tasks:
- name: edit file 1
lineinfile:
path: /var/www/content.hml line: "{{ text }}" tags:
- content
- name: edit file 2
lineinfile: path: /var/www/index.hml
line: "{{ text }}"
tags:
- web
- name: edit file 3
lineinfile:
path: /var/www/etc.hml
line: "{{ text }}"
tags: - content - misc
Which use of the ansible-playbook command on the provided playbook will result in ONLY editing the file / var/www/index.html?
EX407 Exam Question 28
Presuming the inventory is not dynamic, Ansible inventories can be specified using what two file formats?
EX407 Exam Question 29
Which command ships with Ansible and provides module documentation on your system?
EX407 Exam Question 30
What special character is used to designate that you are passing a variable file to a play using the
-e flag?
-e flag?

