From d73f54e7e56f689fa3dc69e5a54f078c9680c337 Mon Sep 17 00:00:00 2001 From: Emil Renner Berthing Date: Wed, 3 Oct 2018 15:31:49 +0200 Subject: debian: add basic Debian role --- roles/debian/templates/hosts.j2 | 11 +++++++++++ roles/debian/templates/locale.gen.j2 | 3 +++ roles/debian/templates/locale.j2 | 3 +++ roles/debian/templates/sources.list.j2 | 8 ++++++++ 4 files changed, 25 insertions(+) create mode 100644 roles/debian/templates/hosts.j2 create mode 100644 roles/debian/templates/locale.gen.j2 create mode 100644 roles/debian/templates/locale.j2 create mode 100644 roles/debian/templates/sources.list.j2 (limited to 'roles/debian/templates') 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 %} -- cgit v1.2.1