EX294日本語試験無料問題集「RedHat Red Hat Certified Engineer (RHCE) exam for Red Hat Enterprise Linux 8 Exam (EX294日本語版) 認定」
ansible のインストールと構成
制御ノード上にユーザー sandy が作成されており、適切な権限が既に付与されています。ssh キーを変更または修正しないでください。コントロール ノードで ansible を実行するために必要なパッケージをインストールします。ansible.cfg をフォルダー /home/sandy/ansible/ansible.cfg に配置するように構成し、sandy ユーザーを介してリモート マシンにアクセスするように構成します。すべてのロールはパス /home/sandy/ansible/roles にある必要があります。インベントリ パスは /home/sandy/ansible/invenlory にある必要があります。
5 つのノードにアクセスできます。
node1.example.com
node2.example.com
node3.example.com
node4.example.com
node5.example.com
これらのノードを、ノード I がグループ dev のメンバーであるインベントリ ファイルに配置するように構成します。nodc2 はグループ test のメンバー、node3 はグループ proxy のメンバー、nodc4 とノード 5 はグループ prod のメンバーです。また、prod はグループ webservers のメンバーです。
制御ノード上にユーザー sandy が作成されており、適切な権限が既に付与されています。ssh キーを変更または修正しないでください。コントロール ノードで ansible を実行するために必要なパッケージをインストールします。ansible.cfg をフォルダー /home/sandy/ansible/ansible.cfg に配置するように構成し、sandy ユーザーを介してリモート マシンにアクセスするように構成します。すべてのロールはパス /home/sandy/ansible/roles にある必要があります。インベントリ パスは /home/sandy/ansible/invenlory にある必要があります。
5 つのノードにアクセスできます。
node1.example.com
node2.example.com
node3.example.com
node4.example.com
node5.example.com
これらのノードを、ノード I がグループ dev のメンバーであるインベントリ ファイルに配置するように構成します。nodc2 はグループ test のメンバー、node3 はグループ proxy のメンバー、nodc4 とノード 5 はグループ prod のメンバーです。また、prod はグループ webservers のメンバーです。
正解:
/home/sandy/ansible/ansible.cfg 内
[デフォルト]
inventory=/home/sandy/ansible/inventory
roles_path=/home/sandy/ansible/roles
remote_user=砂
host_key_checking=false
【特典】
なる=真
become_user=ルート
become_method=sudo
become_ask_pass=false
/home/sandy/ansible/inventory 内
[開発]
ノード 1 .example.com
[テスト]
node2.example.com
[プロキシー]
node3 .example.com
[製品]
node4.example.com
node5 .example.com
[ウェブサーバー:子]
製品
[デフォルト]
inventory=/home/sandy/ansible/inventory
roles_path=/home/sandy/ansible/roles
remote_user=砂
host_key_checking=false
【特典】
なる=真
become_user=ルート
become_method=sudo
become_ask_pass=false
/home/sandy/ansible/inventory 内
[開発]
ノード 1 .example.com
[テスト]
node2.example.com
[プロキシー]
node3 .example.com
[製品]
node4.example.com
node5 .example.com
[ウェブサーバー:子]
製品
/home/sandy/ansible ディレクトリに、パスワード reallysafepw を使用して、lock.yml という ansible ボールト パスワード ファイルを作成します。lock.yml ファイルで、2 つの変数を定義します。1 つは pw_dev でパスワードは「dev」、もう 1 つは pw_mgr でパスワードは「mgr」です。 lock.yml のパスワードを含む secret.txt という通常のファイルを作成します。
正解:
ansible-vault create lock.yml
新しい保管庫パスワード: reallysafepw
確認: 本当に安全なpw

新しい保管庫パスワード: reallysafepw
確認: 本当に安全なpw

rhel システムロールの timesync を使用して、/home/sandy/ansible に timesvnc.yml という Playbook を作成します。サーバー 0.uk.pool.ntp.org で現在構成されている nip を使用する時間を設定します。バーストを有効にします。すべてのホストでこれを行います。
正解:
解決策:


/home/sandy/ansible/ に jinja テンプレートを作成し、hosts.j2 という名前を付けます。このファイルを次のように編集します。ノードの順序は重要ではありません。次に、/home/sandy/ansible に hosts.yml という Playbook を作成し、テンプレートを /root/myhosts の dev ノードにインストールします。


正解:
解決策:

