chiark / gitweb /
Install Debian packages and mail configuration.
[distorted-ansible] / roles / debian / tasks / main.yml
1 ### -*-yaml-*-
2 ###
3 ### Tasks applicable for all Debian hosts.
4
5 ---
6
7 ###--------------------------------------------------------------------------
8 ### Necessary packages.
9
10 - name: read required package lists
11   tags: [pkgs]
12   include_vars: vars/pkglists.yml
13
14 - name: install universally applicable Debian packages
15   tags: [pkgs]
16   apt: name={{ item }} state=installed
17   with_items: pkglist.base
18
19 - name: install Debian packages for physical hosts
20   tags: [pkgs]
21   apt: name={{ item }} state=installed
22   with_items: pkglist.physical
23   when: vm_host is not defined
24
25 - name: install Debian packages for servers
26   tags: [pkgs]
27   apt: name={{ item }} state=installed
28   with_items: pkglist.server
29   when: server is defined
30
31 - name: install Debian packages for VM hosts
32   tags: [pkgs]
33   apt: name={{ item }} state=installed
34   with_items: pkglist.vmhost
35   when: (vm_role |default('none')) == 'host'
36
37 ###--------------------------------------------------------------------------
38 ### PKI machinery.
39
40 - name: install PKI maintenance scripts
41   tags: [pki, pki-scripts]
42   copy: src=pki/{{ item }} dest=/etc/cron.daily/
43   with_items:
44     - update-ca-certs
45     - check-x509-certs
46
47 ###--------------------------------------------------------------------------
48 ### Mail configuration.
49
50 - name: build mail configuration files
51   tags: [mail, mail-config]
52   local_action: command make chdir={{ rootdir }}/exim-config/
53   run_once: true
54
55 - name: install appropriate email configuration
56   tags: [mail, mail-config]
57   copy: src=exim-config/exim4-{{ mail_mode |default('satellite')}}.conf
58         dest=/etc/exim4/exim4.conf
59   notify: restart exim
60
61 ### FIXME: set up certificates and so on. [mail, mail-pki]
62
63 ###--------------------------------------------------------------------------
64 ### Some unpleasant hacks.
65
66 # - name: Trap for yaid
67
68 ###----- That's all, folks --------------------------------------------------