summaryrefslogtreecommitdiff
path: root/ansible/updev.yml
blob: ce30fd0b31b8dab918304821c28dc6d9540855cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
- hosts: updev
  remote_user: root
  become: no
  roles:
    - role: sane_debian_system
    - role: self-updating-system
    - role: comfortable-debian-system
    - role: version-controller
    - role: emacs
    - role: unix_users
    - role: liw

  tasks:
    # Remove ping to force it be reinstalled so that the right
    # capabilities are set.
    - apt:
        name: iputils-ping
        state: absent

    - apt:
        name:
          - build-essential
          - extrautils
          - iputils-ping
          - jq
          - liw-automation
          - pandoc-filter-diagram
          - python3
          - shellcheck
          - subplot
          - texlive-fonts-recommended
          - texlive-latex-base
          - texlive-latex-extra
          - texlive-latex-recommended
          - texlive-plain-generic
          - apt-file
          - bc
          - bind9-host
          - curl
          - dnsutils
          - htop
          - locales-all
          - lshw
          - mmv
          - moreutils
          - num-utils
          - psmisc
          - pv
          - rsync
          - screen
          - strace
          - time
          - units
          - vim
          - w3m
          - whois
          - yaml-mode
          - zip
          - pre-commit
          - elpa-go-mode

    - apt:
        name:
          - golang
          - docker.io
          - docker-compose
        default_release: bullseye-backports
        state: latest

    - copy:
        content: |
          {
            "default-address-pools": [{ "base": "192.168.128.0/17", "size": 24 }]
          }
        dest: /etc/docker/daemon.json

    - user:
        name: liw
        group: docker

  vars:
    ansible_python_interpreter: /usr/bin/python3

    sane_debian_system_version: 2
    sane_debian_system_hostname: "{{ inventory_hostname }}"
    sane_debian_system_codename: bullseye
    sane_debian_system_timezone: Europe/Helsinki
    sane_debian_system_sources_lists:
      - repo: |
          deb http://deb.debian.org/debian bullseye contrib non-free

      - repo: |
          deb-src http://deb.debian.org/debian bullseye main contrib non-free

      - repo: |
          deb http://deb.debian.org/debian bullseye-backports main contrib non-free

      - repo: |
          deb-src http://deb.debian.org/debian bullseye-backports main contrib non-free

      - repo: |
          deb http://security.debian.org/debian-security bullseye-security main contrib non-free

      - repo: |
          deb http://code.liw.fi/debian unstable main
        signing_key: "{{ code_liw_fi_signing_key }}"

      - repo: deb http://ci-prod-controller.vm.liw.fi/debian unstable-ci main
        signing_key: "{{ ci_prod_signing_key }}"

      - repo: deb http://ci-prod-controller.vm.liw.fi/debian unstable main
        signing_key: "{{ ci_prod_signing_key }}"

    unix_users_version: 2
    unix_users:
      - username: liw
        comment: Lars Wirzenius
        sudo: yes