home · contact · privacy
3afcbf7cedf2df0ac37cc2b4bb11ebe87a317044
[config] / ansible / config.yml
1 ---
2 - hosts: all
3   user: root
4   become: yes
5   tasks:
6
7   - name: symlink system files
8     file: state=link force=yes src={{item}} dest={{item|basename|regex_replace('___','/')}}
9     with_fileglob: ~/config/ansible/files/*
10   - name: set hostname for current session
11     shell: hostname w530
12
13   # Configure package management.
14   - name: update package lists
15     apt: update_cache=yes
16   - name: check for initial_purge_happened flag
17     stat: path=flags/initial_purge_happened
18     register: initial_purge
19   - name: perform initial purge
20     include: tasks/initial_purge.yml
21     when: initial_purge.stat.exists == False
22   - name: APT - dist-upgrade
23     apt: upgrade=dist
24
25   # Configure console.
26   - name: ensure locales and console-setup are installed
27     apt: name={{item}} state=present
28     with_items:
29     - locales
30     - console-setup
31   - name: generate en_US.UTF-8 locale
32     locale_gen: name=en_US.UTF-8 state=present
33   - name: run setupcon to apply console settings from /etc/default/
34     command: setupcon
35
36   # Miscellaneous.
37   - name: Ensure dotfile symlinks
38     file: state=link force=yes src={{item}} dest=~/.{{item|basename}}
39     with_fileglob: ~/config/ansible/dotfiles/*
40   - name: ensure man-db, manpages is installed
41     apt: name={{item}} state=present
42     with_items:
43     - man-db
44     - manpages
45   - name: set /etc/localtime
46     file: state=link force=yes src=/usr/share/zoneinfo/Europe/Berlin dest=/etc/localtime
47   - name: ensure git, vim, less are installed
48     apt: name={{item}} state=present
49     with_items:
50     - git
51     - vim
52     - less
53   - name: create user plom
54     user: name=plom
55   - name: ensure boot messages are not cleared on start up
56     replace: dest=/etc/systemd/system/getty.target.wants/getty@tty1.service regexp='^TTYVTDisallocate=yes.*$' replace='TTYVDisallocate=no'