[Oct 13, 2021] Get Free Updates Up to 365 days On Developing EX407 Braindumps
Best Quality RedHat EX407 Exam Questions
NEW QUESTION 39
Create a file called requirements.yml in /home/sandy/ansible/roles to install two roles. The source for the first role is geerlingguy.haproxy and geerlingguy.php. Name the first haproxy-role and the second php-role.
The roles should be installed in /home/sandy/ansible/roles.
Answer:
Explanation:
See the Explanation for complete Solution below.
Explanation
in /home/sandy/ansible/roles
vim requirements.yml
Run the requirements file from the roles directory:
ansible-galaxy install -r requirements.yml -p /home/sandy/ansible/roles
NEW QUESTION 40
What does the -a flag allow you to specify?
- A. Tells ansible to run against all hosts.
- B. Allows a user to specify arguments for a given module.
- C. The -a flag has no use in Ansible.
- D. Tells ansible to run in ad-hoc mode.
Answer: B
NEW QUESTION 41
What special character is used to designate that you are passing a variable file to a play using the
-e flag?
- A. The at symbol: "@"
- B. The plugs sign: "+"
- C. There is no special character required.
- D. The pipe: "|"
Answer: A
Explanation:
The @ symbol will instruct Ansible to find the provided file and parse the file as a variable file.
NEW QUESTION 42
Where does ansible-galaxy install place roles by default?
- A. /usr/share/ansible/roles
- B. $PWD/roles
- C. /etc/ansible/roles
- D. /etc/roles
Answer: C
Explanation:
This is the default location where ansible-galaxy install will attempt to install a role.
NEW QUESTION 43
State whether the following statement is true or false.
A template can only use 1 variable.
- A. False
- B. True
Answer: A
Explanation:
You can use multiple variables in templates.
NEW QUESTION 44
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-playbook -i inventory Buildwww.yml
- C. ansible -i inventory -p Buildwww.yml
- D. ansible-playbook -i inventory -p Buildwww.yml
Answer: B
Explanation:
This command is the correct way to run the playbook using the requested inventory
NEW QUESTION 45
Consider the following playbook.
---
- hosts: local
become: yes
tasks:
- name: create users
user: name: "{{item}}" with_items:
- sam
- john
- bob
How many times is the user module invoked?
- A. 0
- B. 1
- C. 2
- D. 3
Answer: B
Explanation:
The call count will be based on the number of times the with_items loop executes - which is 3 in this case
NEW QUESTION 46
Create a jinja template in /home/sandy/ansible/ and name it hosts.j2. Edit this file so it looks like the one below. The order of the nodes doesn't matter. Then create a playbook in /home/sandy/ansible called hosts.yml and install the template on dev node at /root/myhosts
Answer:
Explanation:
See the Explanation for complete Solution below.
Explanation
Solution as:
NEW QUESTION 47
Which of the following is a configuration file for Ansible Tower?
- A. /etc/ansible/tower.ini
- B. /etc//tower/settings.py
- C. /etc/ansible/tower.py
- D. /etc//tower/settings.ini
Answer: B
Explanation:
This file contains tower settings that may be adjusted.
NEW QUESTION 48
Where can you find a list of all modules in the Ansible online documentation?
- A. Module Index
- B. Master Module List
- C. There is not a full list of all modules in the online documentation.
- D. All modules are listed on the online documentation landing page.
Answer: A
Explanation:
The module index is how the online documentation references the full list of modules.
NEW QUESTION 49
Using the Simulation Program, perform the following tasks:
1. Use an ansible ad-hoc command, check the connectivity of your servers.
2. Use an ad-hoc ansible command, find the free space of your servers.
3. Use an ad-hoc ansible command, find out the memory usage of your servers.
4. Do an ls -l on the targets /var/log/messages file.
5. Tail the contents of the targets /var/log/messages file.
Answer:
Explanation:
See the Explanation for complete Solution below.
Explanation
1. ansible all -m ping
2. ansible all -a "/bin/df -h"
3. ansible all -a "/usr/bin/free"
4. ansible all -a "ls -l /var/log/messages"
5. ansible local -b -a "tail /var/log/messages"
NEW QUESTION 50
What Ansible variable allows access to internal Ansible data?
- A. Environment Variables
- B. Dictionary Variables
- C. Magic Variables
- D. Ansible Facts
Answer: C
Explanation:
Magic variables allow access to internal Ansible data such as host groups and inventory hosts.
NEW QUESTION 51
Which is the default inventory file used by Ansible?
- A. /etc/hosts
- B. /etc/ansible/hosts
- C. ${PWD}/.inventory
- D. /etc/ansible/inventory
Answer: B
Explanation:
Ansbile refers to /etc/ansible/hosts as the default inventory.
NEW QUESTION 52
Which of the following are sub commands of the ansible-galaxy command? (Choose all that apply.)
- A. create
- B. init
- C. find
- D. remove
Answer: D
Explanation:
The command ansible-galaxy remove <role> deletes a role installed on the system. The command `ansible-galaxy init <role> creates a shell for a new role in $PWD.
NEW QUESTION 53
Which of the following are valid flags for the ansible-playbook command? (Choose all that apply.)
- A. --tags
- B. --include-tags
- C. --tag
- D. --skip-tags
Answer: A,D
Explanation:
The --skip-tags flag allows specification of tags to identify specific plays for Ansible to skip.
NEW QUESTION 54
......
RedHat Exam Practice Test To Gain Brilliante Result: https://www.real4dumps.com/EX407_examcollection.html

