parent
de1511b4bb
commit
19721be8b1
@ -1,7 +1,3 @@
|
|||||||
- set_fact:
|
|
||||||
matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['ddclient'] }}"
|
|
||||||
when: "matrix_dynamic_dns_enabled|bool and matrix_dynamic_dns_mode == 'dhcp'"
|
|
||||||
|
|
||||||
- set_fact:
|
- set_fact:
|
||||||
matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-dynamic-dns'] }}"
|
matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-dynamic-dns'] }}"
|
||||||
when: "matrix_dynamic_dns_enabled|bool and matrix_dynamic_dns_mode == 'daemon'"
|
when: "matrix_dynamic_dns_enabled|bool"
|
||||||
|
@ -1,17 +0,0 @@
|
|||||||
---
|
|
||||||
|
|
||||||
- name: Ensure ddclient domain config exists
|
|
||||||
template:
|
|
||||||
src: "{{ role_path }}/templates/ddclient.conf.j2"
|
|
||||||
dest: "/etc/ddclient.conf"
|
|
||||||
mode: 0600
|
|
||||||
|
|
||||||
- name: Ensure ddclient client config exists
|
|
||||||
copy:
|
|
||||||
content: "run_dhclient=\"true\"\nrun_ipup=\"false\"\nrun_daemon=\"false\""
|
|
||||||
dest: "/etc/default/ddclient"
|
|
||||||
mode: 0600
|
|
||||||
owner: "{{ matrix_user_username }}"
|
|
||||||
group: "{{ matrix_user_groupname }}"
|
|
||||||
|
|
||||||
- import_tasks: "{{ role_path }}/tasks/platform/main.yml"
|
|
@ -1,33 +0,0 @@
|
|||||||
---
|
|
||||||
|
|
||||||
- import_tasks: "{{ role_path }}/tasks/platform/main.yml"
|
|
||||||
|
|
||||||
- name: Check existence of ddclient.service
|
|
||||||
stat:
|
|
||||||
path: "{{ systemd_path }}/ddclient.service"
|
|
||||||
register: matrix_dynamic_dns_ddclient_service_stat
|
|
||||||
|
|
||||||
- name: Ensure ddclient.service is stopped
|
|
||||||
service:
|
|
||||||
name: dynamic-dns
|
|
||||||
state: stopped
|
|
||||||
daemon_reload: yes
|
|
||||||
when: "matrix_dynamic_dns_ddclient_service_stat.stat.exists"
|
|
||||||
|
|
||||||
- name: Ensure ddclient.service doesn't exist
|
|
||||||
file:
|
|
||||||
path: "{{ systemd_path }}/ddclient.service"
|
|
||||||
state: absent
|
|
||||||
when: "matrix_dynamic_dns_ddclient_service_stat.stat.exists"
|
|
||||||
|
|
||||||
- name: Ensure ddclient configuration files don't exist
|
|
||||||
file:
|
|
||||||
path:
|
|
||||||
- "etc/ddclient.conf"
|
|
||||||
- "etc/default/ddclient"
|
|
||||||
state: absent
|
|
||||||
|
|
||||||
- name: Ensure systemd reloaded after ddclient.service removal
|
|
||||||
service:
|
|
||||||
daemon_reload: yes
|
|
||||||
when: "matrix_dynamic_dns_ddclient_service_stat.stat.exists"
|
|
Loading…
Reference in new issue