Changing a system's configuration with Ansible isn't much more difficult than provisioning a new system.
For this recipe, we will need the following facts for the new host:
We'll also need to have a couple of templates to provision the following files:
Now, we'll create the playbook to configure the system. Perform the following steps:
~/playbooks/config.ymlplaybook with the following content:
- name: Configure system hosts: all handlers: - include: networking.handlers.yml - include: ntp-client.handlers.yml tasks: - include: networking.tasks.yml - include: ...