Lab Recap Day 1ΒΆ
- Create a new Ansible project with:
- a new
ansible.cfgconfig - a new
hostsinventory file
- a new
Configure ansible to always run as
rootAdd all your hosts to your inventory
- Create a new ntp role with:
- install the package
ntp, tag the task withinstallation - configure
/etc/ntp.confwith thecopymodule, tag the task withconfiguration - start and enable the ntp service, tag the task with
service - restart the service after a config or package change (handler)
- tag all your tasks in your role with
ntp
- install the package
Create a playbook to run the
ntprole on your web1 serverRun and Test the playbook, also try the
--checkand--tagsoption