December 2015
Intermediate to advanced
250 pages
4h 41m
English
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:
ntp_serversdns_serversdns_searchWe'll also need to have a couple of templates to provision the following files:
/etc/logrotate.d/syslog/etc/ntp.conf/etc/ntp/step-tickers/etc/resolv.confNow, we'll create the playbook to configure the system. Perform the following steps:
~/playbooks/config.yml playbook 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: ...