summaryrefslogtreecommitdiffstats
path: root/ansible/node/roles/common/templates
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/node/roles/common/templates')
-rw-r--r--ansible/node/roles/common/templates/chrony.conf.j241
-rw-r--r--ansible/node/roles/common/templates/hosts.j210
-rw-r--r--ansible/node/roles/common/templates/resolv.conf.j23
3 files changed, 54 insertions, 0 deletions
diff --git a/ansible/node/roles/common/templates/chrony.conf.j2 b/ansible/node/roles/common/templates/chrony.conf.j2
new file mode 100644
index 0000000..2a4f259
--- /dev/null
+++ b/ansible/node/roles/common/templates/chrony.conf.j2
@@ -0,0 +1,41 @@
+server {{virthost}} iburst
+
+# Ignore stratum in source selection.
+stratumweight 0
+
+# Record the rate at which the system clock gains/losses time.
+driftfile /var/lib/chrony/drift
+
+# Enable kernel RTC synchronization.
+rtcsync
+
+# In first three updates step the system clock instead of slew
+# if the adjustment is larger than 10 seconds.
+makestep 10 3
+
+# Allow NTP client access from local network.
+#allow 192.168/16
+
+# Listen for commands only on localhost.
+bindcmdaddress 127.0.0.1
+bindcmdaddress ::1
+
+# Serve time even if not synchronized to any NTP server.
+#local stratum 10
+
+keyfile /etc/chrony.keys
+
+# Specify the key used as password for chronyc.
+commandkey 1
+
+# Generate command key if missing.
+generatecommandkey
+
+# Disable logging of client accesses.
+noclientlog
+
+# Send a message to syslog if a clock adjustment is larger than 0.5 seconds.
+logchange 0.5
+
+logdir /var/log/chrony
+#log measurements statistics tracking
diff --git a/ansible/node/roles/common/templates/hosts.j2 b/ansible/node/roles/common/templates/hosts.j2
new file mode 100644
index 0000000..c575ea2
--- /dev/null
+++ b/ansible/node/roles/common/templates/hosts.j2
@@ -0,0 +1,10 @@
+# Generated by autocluster
+127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
+::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
+
+{{ virthost }} kvmhost
+
+# autocluster {{ cluster }}
+{% for hostname, n in nodes | dictsort %}
+{{ n.ips[0] }} {{ hostname }}.{{ resolv_conf.domain | lower }} {{ hostname }}
+{% endfor %}
diff --git a/ansible/node/roles/common/templates/resolv.conf.j2 b/ansible/node/roles/common/templates/resolv.conf.j2
new file mode 100644
index 0000000..7ebaf95
--- /dev/null
+++ b/ansible/node/roles/common/templates/resolv.conf.j2
@@ -0,0 +1,3 @@
+domain {{resolv_conf.domain}}
+search {{resolv_conf.search}}
+nameserver {{resolv_conf.nameserver}}