Which of the following are valid flags for the ansible-playbook command? (Choose all that apply.)
Answer(s): B,C
The --skip-tags flag allows specification of tags to identify specific plays for Ansible to skip.
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?
Answer(s): D
As long as at least one change is made that calls the restart apache handler, it will be run once.
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?
While there is a service module call that will start mariadb, it will never run due to the always false condition attached to that task.
What module is used to deploy a template?
Answer(s): B
The template module is designed to process and deploy template files.
What is a typical use case for an Ansible Template?
Answer(s): A
Post your Comments and Discuss RedHat EX407 exam prep with other Community members:
Our website is free, but we have to fight against AI bots and content theft. We're sorry for the inconvenience caused by these security measures. You can access the rest of the EX407 content, but please register or login to continue.