Q16. Create a file calledpackages.yml in/home/sandy/ansibleto 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 tothe latest.
See the Explanation for complete Solution below.
Explanation
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 thedevelopment node
– name: update all packages on development node
yum:
name: ‘*’
state: latest