[2023年更新]EX294日本語試験問題集でテストエンジン練習テスト問題 [Q10-Q28]

Share

[2023年更新]EX294日本語試験問題集でテストエンジン練習テスト問題

合格できるEX294日本語試験[2023年02月12日]最新35問題

質問 10
ansibleをインストールして構成する
ユーザーbobがコントロールノードに作成されました。制御ノードに対する適切な権限を彼に与えます。制御ノードでansibleを実行するために必要なパッケージをインストールします。
次の要件を満たすために、構成ファイル/home/bob/ansible/ansible.cfgを作成します。
*ロールパスには、/ home / bob / ansible / rolesと、サンプル試験のコースに必要となる可能性のあるその他のパスを含める必要があります。
*インベントリファイルのパスは/ home / bob / ansible / inventoryです。
* Ansibleは、一度に10個のホストを管理できる必要があります。
* Ansibleは、bobユーザーを使用してすべての管理対象ノードに接続する必要があります。
次の5つのノードのインベントリファイルを作成します。
nodel.example.com
node2.example.com
node3.example.com
node4.example.com
node5.example.com
これらのノードを、node1がグループdevのメンバーであるインベントリファイルに含まれるように構成します。 nodc2はグループテストのメンバー、nodc3はグループプロキシのメンバー、nodc4とノード5はグループprodのメンバーです。また、prodはグループWebサーバーのメンバーです。

  • A. In/home/sandy/ansible/ansible.cfg
    [defaults]
    inventory=/home/sandy/ansible/inventory
    roles_path=/home/sandy/ansible/roles
    remote_user= sandy
    host_key_checking=false
    [privilegeescalation]
    become=true
    become_user=root
    become_method=sudo
    become_ask_pass=false
    In /home/sandy/ansible/inventory
    [dev]
    node 1 .example.com
    [test]
    node2.example.com
    [proxy]
    node3 .example.com
    [prod]
    node4.example.com
    node5 .example.com
    [webservers:children]
    Prod
  • B. In/home/sandy/ansible/ansible.cfg
    [defaults]
    inventory=/home/sandy/ansible/inventory
    roles_path=/home/sandy/ansible/roles
    remote_user= sandy
    host_key_checking=false
    [privilegeescalation]
    become=true
    become_user=root
    In /home/sandy/ansible/inventory
    [dev]
    node 1 .example.com
    [test]
    node2.example.com
    [proxy]
    node3 .example.com
    [prod]
    node4.example.com
    node5 .example.com
    [webservers:children]
    prod

正解: A

 

質問 11
Create a file called packages.yml in /home/sandy/ansible to install some packages for the following hosts. On dev, prod and webservers install packages httpd, mod_ssl, and mariadb. On dev only install the development tools package. Also, on dev host update all the packages to the latest.

正解:

解説:
Solution as:

** NOTE 1 a more acceptable answer is likely 'present' since it's not asking to install the latest
state: present
** NOTE 2 need to update the development node
- name: update all packages on development node
yum:
name: '*'
state: latest

 

質問 12
Create a playbook /home/bob /ansible/motd.yml that runs on all inventory hosts and docs the following: The playbook should replaee any existing content of/etc/motd in the following text. Use ansible facts to display the FQDN of each host
On hosts in the dev host group the line should be "Welcome to Dev Server FQDN".
On hosts in the webserver host group the line should be "Welcome to Apache Server FQDN".
On hosts in the database host group the line should be "Welcome to MySQL Server FQDN".

正解:

解説:
/home/sandy/ansible/apache.yml

/home/sandy/ansible/roles/sample-apache/tasks/main.yml
Topic 2, LAB SETUP - 2
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.

 

質問 13
/ home / sandy / ansibleディレクトリにパスワードreallysafepwを使用してlock.ymlというansibleボールトパスワードファイルを作成します。 lock.ymlファイルで2つの変数を定義します。 1つはpw_devで、パスワードは「dev」で、もう1つはpw_mgrで、パスワードは「mgr」です。lock.ymlのパスワードを含むsecret.txtという通常のファイルを作成します。

  • A. ansible-vault create lock.yml
    新しいVaultパスワード:reallysafepw
  • B. ansible-vault create lock.yml
    新しいVaultパスワード:reallysafepw
    確認:reallysafepw

正解: B

 

質問 14
/ home / sandy / ansible / rolesにrequirements.ymlというファイルを作成します。/home/sandy/ansible/にrole.ymlというファイルを作成します。 haproxy-roleはプロキシホストで使用する必要があります。また、http://node3.example.comをカールすると、「Welcome to node4.example.com」と表示され、もう一度カールすると、「Welcome to node5.example.com」と表示されます。php-roleは、prodホストで使用する必要があります。 。

  • A. 解決策:

    curlhttp://node3.example.comでプロキシホストを確認してください
  • B. 解決策:

    curlhttp://node3.example.comでプロキシホストを確認してください

正解: A

 

質問 15
Create a file called adhoc.sh in /home/sandy/ansible which will use adhoc commands to set up a new repository.
The name of the repo will be 'EPEL' the description 'RHEL8' the baseurl is 'https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rmp' there is no gpgcheck, but you should enable the repo.
* You should be able to use an bash script using adhoc commands to enable repos.
Depending on your lab setup, you may need to make this repo "state=absent" after you pass this task.

正解:

解説:
chmod 0777 adhoc.sh
vim adhoc.sh
#I/bin/bash
ansible all -m yum_repository -a 'name=EPEL description=RHEL8
baseurl=https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rmp
gpgcheck=no enabled=yes'

 

質問 16
Create an empty encrypted file called myvault.yml in /home/sandy/ansible and set the password to notsafepw. Rekey the password to iwejfj2221.

正解:

解説:
ansible-vault create myvault.yml
Create new password: notsafepw Confirm password: notsafepw ansible-vault rekey myvault.yml
Current password: notsafepw New password: iwejfj2221 Confirm password: iwejfj2221

 

質問 17
Modify file content.
------------------------
Create a playbook called /home/admin/ansible/modify.yml as follows:
* The playbook runs on all inventory hosts
* The playbook replaces the contents of /etc/issue with a single line of text as
follows:
--> On hosts in the dev host group, the line reads: "Development"
--> On hosts in the test host group, the line reads: "Test"
--> On hosts in the prod host group, the line reads: "Production"

正解:

解説:
Solution as:
# pwd
/home/admin/ansible
# vim modify.yml
---
- name:
hosts: all
tasks:
- name:
copy:
content: "Development"
dest: /etc/issue
when: inventory_hostname in groups['dev']
- name:
copy:
content: "Test"
dest: /etc/issue
when: inventory_hostname in groups['test']
- name:
copy:
content: "Production"
dest: /etc/issue
when: inventory_hostname in groups['prod']
:wq
# ansible-playbook modify.yml --syntax-check
# ansible-playbook modify.yml

 

質問 18
/ home / sandy / ansible /で、logvol.ymlというプレイブックを作成します。プレイで、Iv0という論理ボリュームを作成し、ボリュームグループvgOでサイズ1500MiBにします。ボリュームグループに十分なスペースがない場合は、「論理ボリュームに十分なスペースがありません」というメッセージを出力し、代わりに800MiBIv0を作成します。ボリュームグループがまだ存在しない場合は、「ボリュームグループが存在しません」というメッセージを作成します。すべてのIv0論理ボリュームにxfsファイルシステムを作成します。論理ボリュームをマウントしないでください。

  • A. 解決策:
  • B. 解決策:

正解: B

 

質問 19
Create and run an Ansible ad-hoc command.
--> As a system administrator, you will need to install software on the managed
nodes.
--> Create a shell script called yum-pack.sh that runs an Ansible ad-hoc command to
create yum-repository on each of the managed nodes as follows:
--> repository1
-----------
1. The name of the repository is EX407
2. The description is "Ex407 Description"
3. The base URL is http://content.example.com/rhel8.0/x86_64/dvd/BaseOS/
4. GPG signature checking is enabled
5. The GPG key URL is http://content.example.com/rhel8.0/x86_64/dvd/RPM-GPG-KEYredhat-
release
6. The repository is enabled
--> repository2
-----------
1. The name of the repository is EXX407
2. The description is "Exx407 Description"
3. The base URL is http://content.example.com/rhel8.0/x86_64/dvd/AppStream/
4. GPG signature checking is enabled
5. The GPG key URL is http://content.example.com/rhel8.0/x86_64/dvd/ RPM-GPG-KEYredhat-
release
6. The repository is enabled

正解:

解説:
Solution as:
# pwd
/home/admin/ansible
# vim yum-pack.sh
#!/bin/bash
ansible all -m yum_repository -a 'name=EX407 description="Ex407 Description"
baseurl=http://content.example.com/rhel8.0/x86_64/dvd/BaseOS/ gpgcheck=yes
gpgkey=http://content.example.com/rhel8.0/x86_64/dvd/RPM-GPG-KEY-redhat-release
enabled=yes'
ansible all -m yum_repository -a 'name=EXX407 description="Exx407 Description"
baseurl=http://content.example.com/rhel8.0/x86_64/dvd/AppStream/ gpgcheck=yes
gpgkey=http://content.example.com/rhel8.0/x86_64/dvd/RPM-GPG-KEY-redhat-release
enabled=yes'
:!wq
# chmod +x yum-pack.sh
# bash yum-pack.sh
# ansible all -m command -a 'yum repolist all'

 

質問 20
rhelシステムロールtimesyncを使用して、/ home / sandy / ansibleにtimesvnc.ymlというプレイブックを作成します。サーバー0.uk.pool.ntp.orgで現在構成されているニップを使用する時間を設定します。バーストを有効にします。すべてのホストでこれを実行します。

  • A. 解決策:
  • B. 解決策:

正解: A

 

質問 21
Create a role called apache in "/home/admin/ansible/roles" with the following
requirements:
--> The httpd package is installed, enabled on boot, and started.
--> The firewall is enabled and running with a rule to allow access to the web server.
--> template file index.html.j2 is used to create the file /var/www/html/index.html
with the output:
Welcome to HOSTNAME on IPADDRESS
--> Where HOSTNAME is the fqdn of the managed node and IPADDRESS is the IP-Address of
the managed node.
note: you have to create index.html.j2 file.
--> Create a playbook called httpd.yml that uses this role and the playbook runs on
hosts in the webservers host group.

正解:

解説:
Solution as:
----------
# pwd
/home/admin/ansible/roles/
# ansible-galaxy init apache
# vim apache/vars/main.yml
---
# vars file for apache
http_pkg: httpd
firewall_pkg: firewalld
http_srv: httpd
firewall_srv: firewalld
rule: http
webpage: /var/www/html/index.html
template: index.html.j2
:wq!
# vim apache/tasks/package.yml
---
- name: Installing packages
yum:
name:
- "{{http_pkg}}"
- "{{firewall_pkg}}"
state: latest
:wq!
# vim apache/tasks/service.yml
---
- name: start and enable http service
service:
name: "{{http_srv}}"
enabled: true
state: started
- name: start and enable firewall service
service:
name: "{{firewall_srv}}"
enabled: true
state: started
:wq!
# vim apache/tasks/firewall.yml
---
- name: Adding http service to firewall
firewalld:
service: "{{rule}}"
state: enabled
permanent: true
immediate: true
:wq!
# vim apache/tasks/webpage.yml
---
- name: creating template file
template:
src: "{{template}}"
dest: "{{webpage}}"
notify: restart_httpd
!wq
# vim apache/tasks/main.yml
# tasks file for apache
- import_tasks: package.yml
- import_tasks: service.yml
- import_tasks: firewall.yml
- import_tasks: webpage.yml
:wq!
# vim apache/templates/index.html.j2
Welcome to {{ ansible_facts.fqdn }} on {{ ansible_facts.default_ipv4.address }}
# vim apache/handlers/main.yml
---
# handlers file for apache
- name: restart_httpd
service:
name: httpd
state: restarted
:wq!
# cd ..
# pwd
/home/admin/ansible/
# vim httpd.yml
---
- name: Including apache role
hosts: webservers
pre_tasks:
- name: pretask message
debug:
msg: 'Ensure webserver configuration'
roles:
- ./roles/apache
post_tasks:
- name: Check webserver
uri:
url: "http://{{ ansible_facts.default_ipv4.address }}"
return_content: yes
status_code: 200
:wq!
# ansible-playbook httpd.yml --syntax-check
# ansible-playbook httpd.yml
# curl http://serverx

 

質問 22
Create a file in /home/sandy/ansible/ called report.yml. Using this playbook, get a file called report.txt (make it look exactly as below). Copy this file over to all remote hosts at /root/report.txt. Then edit the lines in the file to provide the real information of the hosts. If a disk does not exist then write NONE.

正解:

解説:
Solution as:

 

質問 23
Create the users in the file usersjist.yml file provided. Do this in a playbook called users.yml located at /home/sandy/ansible. The passwords for these users should be set using the lock.yml file from TASK7. When running the playbook, the lock.yml file should be unlocked with secret.txt file from TASK 7.
All users with the job of 'developer' should be created on the dev hosts, add them to the group devops, their password should be set using the pw_dev variable. Likewise create users with the job of 'manager' on the proxy host and add the users to the group 'managers', their password should be set using the pw_mgr variable.

正解:

解説:
ansible-playbook users.yml -vault-password-file=secret.txt

 

質問 24
Create a playbook called regulartasks.yml which has the system that append the date to /root/datefile every day at noon. Name is job 'datejob'

正解:

解説:
Solution as:

 

質問 25
Create a role called sample-apache in /home/sandy/ansible/roles that enables and starts httpd, enables and starts the firewall and allows the webserver service. Create a template called index.html.j2 which creates and serves a message from /var/www/html/index.html Whenever the content of the file changes, restart the webserver service.
Welcome to [FQDN] on [IP]
Replace the FQDN with the fully qualified domain name and IP with the ip address of the node using ansible facts. Lastly, create a playbook in /home/sandy/ansible/ called apache.yml and use the role to serve the index file on webserver hosts.

正解:

解説:
/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

 

質問 26
/ home / sandy / ansible /にreport.ymlというファイルを作成します。このハンドブックを使用して、report.txtというファイルを取得します(以下のように正確に表示します)。このファイルを/root/report.txtにあるすべてのリモートホストにコピーします。次に、ファイルの行を編集して、ホストの実際の情報を提供します。ディスクが存在しない場合は、NONEと書き込みます。

  • A. 解決策:
  • B. 解決策:

正解: B

 

質問 27
Create a file called specs.empty in home/bob/ansible on the local machine as follows:
HOST=
MEMORY=
BIOS=
VDA_DISK_SIZE=
VDB_DISK_SIZE=
Create the playbook /home/bob/ansible/specs.yml which copies specs.empty to all remote nodes' path /root/specs.txt. Using the specs.yml playbook then edit specs.txt on the remote machines to reflect the appropriate ansible facts.

正解:

解説:
Solution as:

 

質問 28
......

RedHat EX294日本語リアルな2023年最新の知能問題集模擬試験問題集:https://jp.fast2test.com/EX294-JPN-premium-file.html


弊社を連絡する

我々は12時間以内ですべてのお問い合わせを答えます。

我々の働いている時間: ( GMT 0:00-15:00 )
月曜日から土曜日まで

サポート: 現在連絡 

English Deutsch 繁体中文 한국어