- Create an Ansible Role to install Apache Httpd Software on Remote system.
- Deploy Static WebPages on webserver inside /var/www/html folder.
- Start Httpd webserver and make httpd Service permanent on reboot.
- Add Idempotence to Httpd such that on new Webpage Deploy, Webserver restarts automatically.
- Install Ansible on local system and this local machine acts as
Master Node
. - Clone this repository on Local Machine and edit
ansible.cfg
file to add up location where our Role is present usingroles_path
keyword. - Now create Inventory File and Playbook for running this role.Specify Inventory Location in Inventory using
inventory
. - Copy WebPage you like to deploy on webserver to
Ansible-Httpd-Role/files/
and editAnsible-Httpd-Role/vars/main.yml
to tell about webpage. - Go Inside
Ansible-Httpd-Role/vars/main.yml
folder and editweb_page_deploy
given variable to tell about New WebPage.
ansible-playbook <name_of_playbook>