Logo ExamsQA
Exit
Free 0/5
1
Question

== 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 a playbook called packages.yml that: --> Installs the php and mariadb packages on hosts in the dev, test, and prod host groups. --> Installs the Development Tools package group on hosts in the dev host group. --> Updates all packages to the latest version on hosts in the dev host group.

Reveal Only
2
Question

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

Reveal Only
3
Question

== 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 a playbook called balance.yml as follows: * The playbook contains a play that runs on hosts in balancers host group and uses the balancer role. --> This role configures a service to loadbalance webserver requests between hosts in the webservers host group.curl --> When implemented, browsing to hosts in the balancers host group (for example http://node5.example.com) should produce the following output: Welcome to node3.example.com on 192.168.10.z --> Reloading the browser should return output from the alternate web server: Welcome to node4.example.com on 192.168.10.a * The playbook contains a play that runs on hosts in webservers host group and uses the phphello role. --> When implemented, browsing to hosts in the webservers host group with the URL / hello.php should produce the following output: Hello PHP World from FQDN --> where FQDN is the fully qualified domain name of the host. For example, browsing to http://node3.example.com/hello.php, should produce the following output: Hello PHP World from node3.example.com * Similarly, browsing to http://node4.example.com/hello.php, should produce the following output: Hello PHP World from node4.example.com

Reveal Only
4
Question

Create an ansible vault password file called lock.yml with the password reallysafepw in the /home/sandy/ansible directory. In the lock.yml file define two variables. One is pw_dev and the password is 'dev' and the other is pw_mgr and the password is 'mgr' Create a regular file called secret.txt which contains the password for lock.yml.

Reveal Only
5
Question

Create a file called requirements.yml in /home/sandy/ansible/roles a file called role.yml in /home/sandy/ansible/. The haproxy-role should be used on the proxy host. And when you curl http://node3.example.com it should display "Welcome to node4.example.com" and when you curl again "Welcome to node5.example.com" The php-role should be used on the prod host.

Reveal Only