Skip to content

Commit d2b7e0a

Browse files
committed
fix some issues with the playbook
1 parent 2acf750 commit d2b7e0a

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

ansible/deploy-pipeline.yml

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717

1818
- hosts: [hkgmetadb.infra.ooni.io, amsmetadb.ooni.nu]
1919
gather_facts: false # already gathered
20+
vars:
21+
ansible_python_interpreter: "/root/venv/bin/python2.7"
2022
roles:
2123
- role: plpsql
2224
tags: plpsql

ansible/roles/plpsql/tasks/main.yml

+10-3
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,13 @@
3737
notify: reload pl-psql
3838
when: "'db_standby' in group_names"
3939

40+
# TODO fix this with the apt module once we update to the latest debian
41+
# apt:
42+
# name: openvpn
43+
# install_recommends: no
44+
4045
- name: install openvpn
41-
apt:
42-
name: openvpn
43-
install_recommends: no
46+
command: apt-get install --no-install-recommends -y openvpn
4447
tags: dbvpn
4548

4649
- name: openvpn create conf on standby node
@@ -57,6 +60,9 @@
5760

5861
- name: openvpn create shared secret on active node
5962
command: openvpn --genkey --secret /etc/openvpn/oonipgvpn.key
63+
args:
64+
creates: /etc/openvpn/oonipgvpn.key
65+
notify: restart openvpn
6066
when: "'db_active' in group_names"
6167
tags: dbvpn
6268

@@ -71,6 +77,7 @@
7177
copy:
7278
content: "{{ pgvpn_secret }}"
7379
dest: /etc/openvpn/oonipgvpn.key
80+
notify: restart openvpn
7481
when: "'db_standby' in group_names"
7582
tags: dbvpn
7683

0 commit comments

Comments
 (0)