sandervanvugt

RHCE live day2 lab

Jun 18th, 2020
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. Write a playbook that meets the following requirements. Use multiple plays in a way that makes sense.
  2. [1] Write a first play that installs the httpd and mod_ssl packages on host ansible2.
  3. [2] Use variable inclusion to define the package names in a separate file.
  4. [3] Use a conditional to loop over the list of packages to be installed.
  5. [4] Install the packages only if the current operating system is CentOS or RedHat (but not Fedora) version 8.0 or later. If that is not the case, the playbook should fail with the error message "Host hostname does not meet minimal requirements,” where hostname is replaced with the current host name.
  6. [5] On the Ansible control host, create a file /tmp/index.html. This file must have the contents "welcome to my webserver".
  7. [6] If the file /tmp/index.html is successfully copied to /var/www/html/index.html, the web server process must be restarted. If copying the package fails, the playbook should show an error message.
  8. [7] The firewall must be opened for the http as well as the https services.
Add Comment
Please, Sign In to add comment