Added role for dynamic dns
This commit is contained in:
16
roles/matrix-dynamic-dns/tasks/platform/archlinux.yml
Normal file
16
roles/matrix-dynamic-dns/tasks/platform/archlinux.yml
Normal file
@ -0,0 +1,16 @@
|
||||
---
|
||||
|
||||
- name: Ensure ddclient is installed
|
||||
pacman:
|
||||
name: ddclient
|
||||
state: latest
|
||||
when: "run_setup|bool and matrix_dynamic_dns_enabled|bool"
|
||||
|
||||
- name: Ensure ddclient is uninstalled
|
||||
pacman:
|
||||
name: ddclient
|
||||
state: absent
|
||||
update_cache: true
|
||||
become: true
|
||||
when: "run_setup|bool and not matrix_dynamic_dns_enabled|bool"
|
||||
|
23
roles/matrix-dynamic-dns/tasks/platform/centos.yml
Normal file
23
roles/matrix-dynamic-dns/tasks/platform/centos.yml
Normal file
@ -0,0 +1,23 @@
|
||||
---
|
||||
|
||||
- name: Ensure yum packages are installed
|
||||
yum:
|
||||
name: epel-release
|
||||
state: latest
|
||||
update_cache: yes
|
||||
when: "run_setup|bool and matrix_dynamic_dns_enabled|bool"
|
||||
|
||||
- name: Ensure ddclient is installed
|
||||
yum:
|
||||
name: ddclient
|
||||
state: latest
|
||||
when: "run_setup|bool and matrix_dynamic_dns_enabled|bool"
|
||||
|
||||
- name: Ensure ddclient is uninstalled
|
||||
yum:
|
||||
name:
|
||||
- ddclient
|
||||
- epel-release
|
||||
state: absent
|
||||
when: "run_setup|bool and not matrix_dynamic_dns_enabled|bool"
|
||||
|
18
roles/matrix-dynamic-dns/tasks/platform/debian.yml
Normal file
18
roles/matrix-dynamic-dns/tasks/platform/debian.yml
Normal file
@ -0,0 +1,18 @@
|
||||
---
|
||||
|
||||
- name: Ensure ddclient is installed
|
||||
apt:
|
||||
name: ddclient
|
||||
state: present
|
||||
update_cache: true
|
||||
become: true
|
||||
when: "run_setup|bool and matrix_dynamic_dns_enabled|bool"
|
||||
|
||||
- name: Ensure ddclient is uninstalled
|
||||
apt:
|
||||
name: ddclient
|
||||
state: absent
|
||||
update_cache: true
|
||||
become: true
|
||||
when: "run_setup|bool and not matrix_dynamic_dns_enabled|bool"
|
||||
|
11
roles/matrix-dynamic-dns/tasks/platform/main.yml
Normal file
11
roles/matrix-dynamic-dns/tasks/platform/main.yml
Normal file
@ -0,0 +1,11 @@
|
||||
---
|
||||
|
||||
- include_tasks: "{{ role_path }}/tasks/platform/centos.yml"
|
||||
when: ansible_distribution == 'CentOS'
|
||||
|
||||
# The instructions are the same for Debian, Ubuntu, and Raspbian
|
||||
- include_tasks: "{{ role_path }}/tasks/platform/debian.yml"
|
||||
when: ansible_distribution == 'Debian'
|
||||
|
||||
- include_tasks: "{{ role_path }}/tasks/platform/archlinux.yml"
|
||||
when: ansible_distribution == 'Archlinux'
|
Reference in New Issue
Block a user