Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ In the `molecule-bash` container, run `ansible-playbook` as in [deploy.yml](work
On the host,

```
docker cp molecule-bash:${path_to_download_dir} .
docker cp molecule-bash:/tmp/download .
```

Edit the `ovpn` file if necessary, and establish a VPN connection.
Expand Down
1 change: 1 addition & 0 deletions ansible/roles/openvpn/tasks/server/prepare/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
- name: update cache
ansible.builtin.apt:
update_cache: yes
changed_when: False

- name: install openvpn
ansible.builtin.apt:
Expand Down
3 changes: 3 additions & 0 deletions ansible/roles/openvpn/tasks/server/prepare/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
- name: import system tasks
ansible.builtin.import_tasks: system.yml

- name: import resolved tasks
ansible.builtin.import_tasks: resolved.yml

- name: update package cache
action: "{{ ansible_pkg_mgr }} update_cache=yes"
changed_when: False
Expand Down
27 changes: 27 additions & 0 deletions ansible/roles/openvpn/tasks/server/prepare/resolved.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
- name: check if UDP port 53 is in use
ansible.builtin.shell:
cmd: ss -nlu | tr '\t' ' ' | tr -s ' ' | cut -d ' ' -f 4 | grep ':53$'
register: ss_udp_53_result
ignore_errors: true
changed_when: False

- name: stop the stub listener
when: ss_udp_53_result is succeeded
block:
- name: ln
ansible.builtin.file:
state: link
force: true
src: ../run/systemd/resolve/resolv.conf
path: /etc/resolv.conf

- name: resolved.conf
ansible.builtin.lineinfile:
path: /etc/systemd/resolved.conf
regexp: '^DNSStubListener='
line: DNSStubListener=no

- name: restart resolved
ansible.builtin.service:
name: systemd-resolved
state: restarted # reload unsupported