September 2018
Beginner to intermediate
214 pages
5h 53m
English
This folder contains the template files used by the role to create the actual configuration files. These are then deployed by the role to the remote hosts. They are Jinja2 template engine scripts that enable loops and other features. Here is an example of a template file:
template/ntp.conf.j2:driftfile /var/lib/ntp/ntp.driftfilegen loopstats file loopstats type day enablefilegen peerstats file peerstats type day enablefilegen clockstats file clockstats type day enableloop {{ ntpserv1 }}loop {{ ntpserv2 }}pool ntp.ubuntu.comrestrict -4 default kod notrap nomodify nopeer noquery limitedrestrict -6 default kod notrap nomodify nopeer noquery limitedrestrict 127.0.0.1restrict ::1restrict source notrap nomodify noquery
Read now
Unlock full access