Lab Recap Day 1ΒΆ

  • Create a new Ansible project with:
    • a new ansible.cfg config
    • a new hosts inventory file
  • Configure ansible to always run as root

  • Add all your hosts to your inventory

  • Create a new ntp role with:
    • install the package ntp, tag the task with installation
    • configure /etc/ntp.conf with the copy module, tag the task with configuration
    • 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
  • Create a playbook to run the ntp role on your web1 server

  • Run and Test the playbook, also try the --check and --tags option