summaryrefslogtreecommitdiff
path: root/ansible/roles/sane-debian-system/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/roles/sane-debian-system/tasks/main.yml')
-rw-r--r--ansible/roles/sane-debian-system/tasks/main.yml63
1 files changed, 63 insertions, 0 deletions
diff --git a/ansible/roles/sane-debian-system/tasks/main.yml b/ansible/roles/sane-debian-system/tasks/main.yml
new file mode 100644
index 0000000..187539c
--- /dev/null
+++ b/ansible/roles/sane-debian-system/tasks/main.yml
@@ -0,0 +1,63 @@
+# Set hostname.
+
+- name: set hostname
+ hostname: name={{ hostname }}
+
+- name: add hostname to /etc/hosts
+ lineinfile:
+ dest: /etc/hosts
+ regexp: '^127\.0\.0\.1'
+ line: "127.0.0.1 localhost {{ hostname }}"
+ owner: root
+ group: root
+ mode: 0644
+
+# Configure the main sources.list using a Jinja2 template, because
+# there's a whole bunch of repos and there's some conditional repos
+# involved.
+
+- name: configure main sources.list
+ template:
+ src: sources.list.j2
+ dest: /etc/apt/sources.list
+
+# Update lists, upgrade packages.
+
+- name: update apt package lists
+ apt:
+ update_cache: yes
+ cache_valid_time: 0
+
+- name: upgrade packages
+ apt:
+ upgrade: dist
+
+- name: free up disk space by removing apt package cache
+ shell: |
+ apt"-get" clean
+
+# Install/configure packages that are always needed.
+
+- name: install acpi-support-base
+ apt: name=acpi-support-base
+
+- name: install ntp
+ apt: name=ntp
+
+- name: install locales
+ apt: name=locales
+
+- name: create en_GB.UTF-8 locale
+ locale_gen: state=present name=en_GB.UTF-8
+
+- name: create fi_FI.UTF-8 locale
+ locale_gen: state=present name=fi_FI.UTF-8
+
+# Get rid of bash-completion. It tends to irritate me more than it is
+# ever helpful.
+
+- name: REMOVE bash-completion
+ apt:
+ name: bash-completion
+ state: absent
+ purge: yes