無料2022年最新のEX407問題集で100%合格保証には最新の サンプル
準備EX407問題解答無料更新には100%試験合格保証 [2022]
質問 16
Create a playbook calledwebdev.yml . Theplaybook will create a directory Avcbdev on dev host. The permission of the directory are 2755 and owner is webdev. Create a symbolic link from/Webdev to /var/www/html/webdev. Serve a file from Avebdev7index.html which displays the text "Development" Curl
http://node1.example.com/webdev/index.htmlto test
正解:
解説:
See the Explanation for complete Solution below.
Explanation
Solution as:
質問 17
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-playbook -i inventory -p Buildwww.yml
- B. ansible -i inventory -p Buildwww.yml
- C. ansible -i inventory Build.yml
- D. ansible-playbook -i inventory Buildwww.yml
正解: D
解説:
This command is the correct way to run the playbook using the requested inventory
質問 18
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"
正解:
解説:
See the Explanation for complete Solution below.
Explanation
Solution as:
質問 19
Create a file called mysecret.yml on the control host using ansible vault in home/bob/ansible. Set the password to 'notasafepass' and inside the file create a variable called dev_pass with the value of devops. Save the file.
Then go back in the file and change dev_pass value to devops123. Then change the vault password of mysecret.yml to verysafepass
正解:
解説:
See the Explanation for complete Solution below.
Explanation
ansible-vault create lock.yml
New Vault Password: reallysafepw
Confirm: reallysafepw
質問 20
Is it possible to specify multiple inventory files at once?
- A. Yes, you must provide extra parameters to the -i flag.
- B. No.
- C. Yes, you must specify a reference inventory master file.
- D. Yes, you specify your inventory as a directory containing valid inventory files.
正解: D
質問 21
State whether the following statement is true or false.
A template has a maximum of 10 variables.
- A. False
- B. True
正解: A
解説:
The No is much higher.
質問 22
Create a role called sample-apache and store it in /home/bob/ansible/roles. The role should satisfy the following requirements:
*In the role, install and enable httpd. Also enable the firewall to allow http. Also run the template
*index.html.j2 and make sure this runs Create a template index.html.j2 that displays "Welcome to the server HOSTNAME" In a play called apache.yml in /home/bob/ansible/ run the sample-apache role.
正解:
解説:
See the Explanation for complete Solution below.
Explanation
/home/sandy/ansible/apache.yml
/home/sandy/ansible/roles/sample-apache/tasks/main.yml
/home/sandy/ansible/roles/sample-apache/templates/index.html.j2
In /home/sandy/ansible/roles/sample-apache/handlers/main.yml
質問 23
What are the minimum configurations that must be made to install Ansible Tower?
- A. PROJECTS_ROOT must be configured.
- B. You must provide a target host and set some key user passwords.
- C. You must specify a few key user passwords.
- D. You must generate an SSL certificate for the Ansible Tower web frontend.
正解: A
解説:
This is the only required configuration change needed prior to installation.
質問 24
An Ansible inventory may contain which of the following? (Choose all that apply.)
- A. Variable declarations
- B. Plays
- C. Hosts
- D. Groups
正解: A,C,D
解説:
Groups of hosts (and even groups of groups) may be defined within an inventory. The primary purpose of an Ansible inventory is to maintain a list of hosts with which Ansible may interact.
質問 25
Create the users in the fileusersjist.ymlfile provided. Do this in a playbook called users.yml located at
/home/sandy/ansible.The passwords for these users should be set using thelock.ymlfile from TASK7. When running the playbook, the lock.yml file should be unlocked withsecret.txtfile from TASK 7.
All users with the job of 'developer' should be created on thedevhosts, add them to the group devops, their password should be set using thepw_devvariable. Likewise create users with the job of 'manager' on theproxy host and add the users to the group 'managers', their password should be set using thepw_mgrvariable.
正解:
解説:
See the Explanation for complete Solution below.
Explanation
ansible-playbook users.yml -vault-password-file=secret.txt
質問 26
In /home/sandy/ansible/ create a playbook called logvol.yml. In the play create a logical volume called Iv0 and make it of size 1500MiB on volume group vgO If there is not enough space in the volume group print a message "Not enough space for logical volume" and then make a 800MiB Iv0 instead. If the volume group still doesn't exist, create a message "Volume group doesn't exist" Create an xfs filesystem on all Iv0 logical volumes. Don't mount the logical volume.
正解:
解説:
Solution as:
質問 27
Which keywords are valid? (Choose all that apply.)
- A. never
- B. always
- C. rescue
- D. block
正解: B,C,D
解説:
Always is a valid keyword that is part of the block group error handling set of keywords.
Block is a valid keyword that is part of the block group error handling set of keywords.
質問 28
Consider the following playbook.
- hosts: webservers
become: yes
- name: install httpd
yum:
name: httpd
state: latest
Which line includes a syntax error?
- A. The file does not end with end-playbook.
- B. become: yes - there is no attribute called become
- C. The playbook does not include the task directive.
- D. yum: - yum should be proceeded with a hyphen
正解: C
解説:
The "task:" directive is required at the prior to providing the tasks of a playbook. Without it, Ansible will not throw an error.
質問 29
State whether the following statement is true or false.
The correct structure for use with roles has the various portions of the role under a central folder.
E.g. if the role is called apache then the location of the tasks would be the following:
apache - tasks - main.yml
- A. True
- B. False
正解: A
解説:
This is the format for the file system used for roles:
project/
defaults
main.yml
files
handlers
main.yml
meta
main.yml
README.md
tasks
main.yml
templates
tests
inventory
test.yml
vars
main.yml
質問 30
Which command will use servers in a local inventory called invent.local?
- A. ansible all -m ping -f invent.local
- B. ansible servers -m ping
- C. ansible all -m ping
- D. ansible all -m ping -i invent.local
正解: D
質問 31
Where are custom facts defined on a host?
- A. /etc/ansible/<HOST>/*.fact
- B. /etc/ansible/facts.db
- C. /etc/ansible/facts.d/<HOSTNAME>
- D. /etc/ansible/facts.d/*.fact
正解: D
解説:
Custom facts are gathered from all files with the .fact extension in /etc/ansible/facts.d.
質問 32
What special character is used to designate that you are passing a variable file to a play using the -e flag?
- A. The plugs sign: "+"
- B. The pipe: "|"
- C. The at symbol: "@"
- D. There is no special character required.
正解: C
解説:
The @ symbol will instruct Ansible to find the provided file and parse the file as a variable file.
質問 33
Create a playbook /home/bob/ansible/timesync.yml that runs on hosts in the webservers host group and does the following:
* Uses the timesync RHEL system role.
* Sets the ntp server to 0.uk.pool.ntp.org
* Sets the timezone to UTC
正解:
解説:
Solution as:
質問 34
Templates must be written in what language?
- A. Ruby
- B. Jinja2
- C. XML
- D. INI
正解: B
解説:
Templates are parsed using the Jinja2 templating language.
質問 35
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"
正解:
解説:
Solution as:
質問 36
===================================================================================
control.realmX.example.com _ workstation.lab.example.com
node1.realmX.example.com _ servera.lab.example.com
node2.realmX.example.com _ serverb.lab.example.com
node3.realmX.example.com _ serverc.lab.example.com
node4.realmX.example.com _ serverd.lab.example.com
node5.realmX.example.com
- username:root, password:redhat
- username:admin, password:redhat
note1. don't change 'root' or 'admin' password.
note2. no need to create ssh-keygen for access, its pre-defined
note3. SELinux is in enforcing mode and firewalld is disabled/stop on whole managed hosts.
Create Logical volumes with lvm.yml in all nodes according to following
requirements.
----------------------------------------------------------------------------------------
* Create a new Logical volume named as 'data'
* LV should be the member of 'research' Volume Group
* LV size should be 1500M
* It should be formatted with ext4 file-system.
--> If Volume Group does not exist then it should print the message "VG Not found"
--> If the VG can not accommodate 1500M size then it should print "LV Can not be
created with
following size", then the LV should be created with 800M of size.
--> Do not perform any mounting for this LV.
正解:
解説:
Solution as:
# pwd
/home/admin/ansible
# vim lvm.yml
---
- name:
hosts: all
ignore_errors: yes
tasks:
- name:
lvol:
lv: data
vg: research
size: "1500"
- debug:
msg: "VG Not found"
when: ansible_lvm.vgs.research is not defined
- debug:
msg: "LV Can not be created with following size"
when: ansible_lvm.vgs.research.size_g < "1.5"
- name:
lvol:
lv: data
vg: research
size: "800"
when: ansible_lvm.vgs.research.size_g < "1.5"
- name:
filesystem:
fstype: ext4
dev: /dev/research/data
:wq!
# ansible-playbook lvm.yml --syntax-check
# ansible-playbook lvm.yml
質問 37
......
RedHat EX407 認定試験の出題範囲:
| トピック | 出題範囲 |
|---|---|
| トピック 1 |
|
| トピック 2 |
|
| トピック 3 |
|
| トピック 4 |
|
| トピック 5 |
|
| トピック 6 |
|
| トピック 7 |
|
| トピック 8 |
|
リアル問題集RedHat EX407試験問題 [更新されたのは2022年]:https://jp.fast2test.com/EX407-premium-file.html