summaryrefslogtreecommitdiffstats
path: root/roles/bacula-dir/tasks
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2016-05-22 17:21:16 +0200
committerGuilhem Moulin <guilhem@fripost.org>2016-05-22 17:53:58 +0200
commit8cf4032ecec5b9f58d829e89f231179170432539 (patch)
tree24947cc32af42e98bca3ed0b6319c69c77321262 /roles/bacula-dir/tasks
parentf7a5a19edc504980e2e8f93ab027162756710d59 (diff)
Tunnel bacula (dir → {fd,sd} and fd → sd) traffic through IPSec.
Diffstat (limited to 'roles/bacula-dir/tasks')
-rw-r--r--roles/bacula-dir/tasks/main.yml69
1 files changed, 0 insertions, 69 deletions
diff --git a/roles/bacula-dir/tasks/main.yml b/roles/bacula-dir/tasks/main.yml
index 8d182d2..30a25c1 100644
--- a/roles/bacula-dir/tasks/main.yml
+++ b/roles/bacula-dir/tasks/main.yml
@@ -1,72 +1,3 @@
-- name: Create /etc/stunnel/certs
- file: path=/etc/stunnel/certs
- state=directory
- owner=root group=root
- mode=0755
-
-- name: Generate a private key and a X.509 certificate for Bacula Dir
- command: genkeypair.sh x509
- --pubkey=/etc/stunnel/certs/{{ inventory_hostname_short }}-dir.pem
- --privkey=/etc/stunnel/certs/{{ inventory_hostname_short }}-dir.key
- --ou=BaculaDir --cn={{ inventory_hostname }} --dns={{ inventory_hostname }}
- -t rsa -b 4096 -h sha512
- register: r1
- changed_when: r1.rc == 0
- failed_when: r1.rc > 1
- notify:
- - Restart stunnel@bacula-dir
- tags:
- - genkey
-
-- name: Fetch Bacula Dir X.509 certificate
- # Ensure we don't fetch private data
- become: False
- fetch_cmd: cmd="openssl x509"
- stdin=/etc/stunnel/certs/{{ inventory_hostname_short }}-dir.pem
- dest=certs/bacula/{{ inventory_hostname_short }}-dir.pem
- tags:
- - genkey
-
-- name: Copy Bacula SD X.509 certificates
- copy: src=certs/bacula/{{ hostvars[item].inventory_hostname_short }}-sd.pem
- dest=/etc/stunnel/certs/
- owner=root group=root
- mode=0644
- with_items: "{{ groups['bacula-sd'] | difference([inventory_hostname]) | sort }}"
- register: r2
- notify:
- - Restart stunnel@bacula-dir
-
-- name: Copy Bacula FD X.509 certificates
- copy: src=certs/bacula/{{ hostvars[item].inventory_hostname_short }}-fd.pem
- dest=/etc/stunnel/certs/
- owner=root group=root
- mode=0644
- with_items: "{{ groups.all | difference([inventory_hostname]) | sort }}"
- register: r3
- notify:
- - Restart stunnel@bacula-dir
-
-- name: Configure stunnel
- template: src=etc/stunnel/bacula-dir.conf.j2
- dest=/etc/stunnel/bacula-dir.conf
- owner=root group=root
- mode=0644
- register: r4
- notify:
- - Restart stunnel@bacula-dir
-
-- name: Enable stunnel@bacula-dir
- service: name=stunnel4@bacula-dir enabled=yes
-
-- name: Start stunnel@bacula-dir
- service: name=stunnel4@bacula-dir state=started
- when: not (r1.changed or r2.changed or r3.changed or r4.changed)
-
-- meta: flush_handlers
-
-
-
- name: Install bacula-director
apt: pkg={{ item }}
with_items: