aboutsummaryrefslogtreecommitdiff
path: root/ansible/roles/unix-machine
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2018-09-17 23:09:05 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2018-09-17 23:09:05 +0200
commiteac6bfa06de01222ceb33a6865c01fc46d99769f (patch)
tree1515a344dacb54db571df4b25cb14ee06d094e85 /ansible/roles/unix-machine
parent4d6a0f553ae4cbdeec73dffe4aabb3110c0e09c0 (diff)
downloadinfra-eac6bfa06de01222ceb33a6865c01fc46d99769f.tar.gz
infra-eac6bfa06de01222ceb33a6865c01fc46d99769f.tar.bz2
infra-eac6bfa06de01222ceb33a6865c01fc46d99769f.tar.xz
infra-eac6bfa06de01222ceb33a6865c01fc46d99769f.zip
o Lots of VM work.
Diffstat (limited to 'ansible/roles/unix-machine')
-rw-r--r--ansible/roles/unix-machine/handlers/main.yml3
-rw-r--r--ansible/roles/unix-machine/tasks/main.yml31
2 files changed, 34 insertions, 0 deletions
diff --git a/ansible/roles/unix-machine/handlers/main.yml b/ansible/roles/unix-machine/handlers/main.yml
new file mode 100644
index 0000000..ce78323
--- /dev/null
+++ b/ansible/roles/unix-machine/handlers/main.yml
@@ -0,0 +1,3 @@
+- name: update apt cache
+ apt:
+ update_cache: yes
diff --git a/ansible/roles/unix-machine/tasks/main.yml b/ansible/roles/unix-machine/tasks/main.yml
new file mode 100644
index 0000000..78e346a
--- /dev/null
+++ b/ansible/roles/unix-machine/tasks/main.yml
@@ -0,0 +1,31 @@
+- name: /etc/apt/apt.conf.d/99force-ipv4
+ copy:
+ dest: /etc/apt/apt.conf.d/99force-ipv4
+ content: 'Acquire::ForceIPv4 "true";'
+- name: /etc/apt/sources.list
+ notify: update apt cache
+ copy:
+ dest: /etc/apt/sources.list
+ content: |
+ deb [arch=i386] http://deb.debian.org/debian stretch main contrib non-free
+ deb [arch=i386] http://security.debian.org/ stretch/updates main contrib non-free
+
+- meta: flush_handlers
+
+# Make sure etckeeper installed very early
+- name: packages (early)
+ tags: packages
+ apt:
+ name: "{{ item }}"
+ install_recommends: no
+ with_items:
+ - git
+ - etckeeper
+
+- name: packages
+ tags: packages
+ apt:
+ name: "{{ item }}"
+ install_recommends: no
+ with_items:
+ - iputils-ping