Which of the following are valid flags for the ansible-playbook command? (Choose all that apply.)
A. --include-tags
B. --tags
C. --skip-tags
D. --tag
Consider the following play excerpt:
-name: deploy app config template: src: app.xml.j2 dest: /etc/app.xml notify:
-
restart memcached
-
restart apache
-name: deploy httpd config
template:
src: httpd.conf.j2
dest: /etc/httpd/conf/httpd.conf
notify:
-restart apache
-name: deploy httpd config
template:
src: site.conf.j2
dest: /etc/httpd/conf/site.conf
notify:
-restart apache
Presuming all of the listed tasks in the play change the files they act on and the handler is correctly defined in another file, how many times is the "restart apache" handler ran?
A. 3
B. 0
C. 2
D. 1
Consider the following playbook.
-hosts: webservers become: yes
-name: install httpd yum: name: httpd state: latest
Which line includes a syntax error?
A. become: yes
Which of the following attributes specifies how a handler can be notified? (Choose all that apply.)
A. name
B. service
C. listen
D. handle
What is the primary difference between the shell and command module?
A. The shell module is for executing shell commands, and the command module is for Ansible internal commands.
B. The shell module sets up a shell environment and the command module only runs the provided command.
C. The shell module sets a default shell whereas the command module executes a shell command.
D. There is no difference.
Which command is the correct way to run the playbook /home/ansible/Buildwww.yml using the inventory file /home/ansible/inventory, assuming your present working directory is /home/ansible?
A. ansible -i inventory Build.yml
B. ansible -i inventory -p Buildwww.yml
C. ansible-playbook -i inventory -p Buildwww.yml
D. ansible-playbook -i inventory Buildwww.yml
Which Ansible ad-hoc flag is analogous to the become directive?
A. b
B. f
C. i
D. B
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?
A. ansible-playbook /home/ansible/web.yml
B. ansible-playbook /home/ansible/web.yml --skip-tags web
C. ansible-playbook /home/ansible/web.yml --skip-tags content
D. ansible-playbook /home/ansible/web.yml --tags content
What keyword sets a change condition for a given task?
A. flag_change
B. changed_when
C. register_change
D. change_set
Which line instructs ansible to install httpd?
A. yum: name=httpd state=installed
B. tasks: install httpd
C. service: name=httpd state=installed
D. name: service=httpd state=installed
Nowadays, the certification exams become more and more important and required by more and more enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare for the exam in a short time with less efforts? How to get a ideal result and how to find the most reliable resources? Here on Vcedump.com, you will find all the answers. Vcedump.com provide not only Red Hat exam questions, answers and explanations but also complete assistance on your exam preparation and certification application. If you are confused on your EX407 exam preparations and Red Hat certification application, do not hesitate to visit our Vcedump.com to find your solutions here.