aboutsummaryrefslogtreecommitdiffstats
path: root/roles/debian/templates
diff options
context:
space:
mode:
authorEmil Renner Berthing <esmil@labitat.dk>2018-10-03 15:31:49 +0200
committerEmil Renner Berthing <esmil@labitat.dk>2018-10-03 20:22:43 +0200
commitd73f54e7e56f689fa3dc69e5a54f078c9680c337 (patch)
tree303a4c56e9be6d69b1e3be85ab253ac572d07e95 /roles/debian/templates
parent0531f80caf457831408367aaaedcc0446c00cdff (diff)
downloadlabitat-ansible-d73f54e7e56f689fa3dc69e5a54f078c9680c337.tar.gz
labitat-ansible-d73f54e7e56f689fa3dc69e5a54f078c9680c337.tar.xz
labitat-ansible-d73f54e7e56f689fa3dc69e5a54f078c9680c337.zip
debian: add basic Debian role
Diffstat (limited to 'roles/debian/templates')
-rw-r--r--roles/debian/templates/hosts.j211
-rw-r--r--roles/debian/templates/locale.gen.j23
-rw-r--r--roles/debian/templates/locale.j23
-rw-r--r--roles/debian/templates/sources.list.j28
4 files changed, 25 insertions, 0 deletions
diff --git a/roles/debian/templates/hosts.j2 b/roles/debian/templates/hosts.j2
new file mode 100644
index 0000000..bce5120
--- /dev/null
+++ b/roles/debian/templates/hosts.j2
@@ -0,0 +1,11 @@
+127.0.0.1 localhost
+
+::1 localhost ip6-localhost ip6-loopback
+ff02::1 ip6-allnodes
+ff02::2 ip6-allrouters
+{% if hosts is defined %}
+
+{% for addr, names in hosts %}
+{{ addr }} {{ names|join(' ') }}
+{% endfor %}
+{% endif %}
diff --git a/roles/debian/templates/locale.gen.j2 b/roles/debian/templates/locale.gen.j2
new file mode 100644
index 0000000..2ab95c7
--- /dev/null
+++ b/roles/debian/templates/locale.gen.j2
@@ -0,0 +1,3 @@
+{% for locale in locale.generated %}
+{{ locale }}
+{% endfor %}
diff --git a/roles/debian/templates/locale.j2 b/roles/debian/templates/locale.j2
new file mode 100644
index 0000000..cad9883
--- /dev/null
+++ b/roles/debian/templates/locale.j2
@@ -0,0 +1,3 @@
+{% for key, value in locale.default|dictsort(true) %}
+{{ key }}={{ value }}
+{% endfor %}
diff --git a/roles/debian/templates/sources.list.j2 b/roles/debian/templates/sources.list.j2
new file mode 100644
index 0000000..b6c54c3
--- /dev/null
+++ b/roles/debian/templates/sources.list.j2
@@ -0,0 +1,8 @@
+{% for name, opts in apt_sources|dictsort(true) %}
+{% if opts is mapping %}
+deb {{ apt_repos[name]['uri'] }} {{ apt_repos[name].suite }} {{ opts.components|join(' ') }}
+{% if 'source' in opts and opts.source %}
+deb-src {{ apt_repos[name]['uri'] }} {{ apt_repos[name].suite }} {{ opts.components|join(' ') }}
+{% endif %}
+{% endif %}
+{% endfor %}