remove syncoid, switch to rsync #221
3 changed files with 23 additions and 21 deletions
|
@ -1,9 +1,9 @@
|
||||||
---
|
---
|
||||||
- name: template ssh private key
|
- name: template ssh private key
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.template:
|
ansible.builtin.file:
|
||||||
src: private_key.j2
|
state: absent
|
||||||
dest: "/etc/sanoid/.ssh/id_sanoid"
|
path: "/etc/sanoid/.ssh/id_sanoid"
|
||||||
owner: "{{ sanoid_user }}"
|
owner: "{{ sanoid_user }}"
|
||||||
group: "{{ sanoid_user_group }}"
|
group: "{{ sanoid_user_group }}"
|
||||||
mode: "0400"
|
mode: "0400"
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
become: true
|
become: true
|
||||||
community.general.sudoers:
|
community.general.sudoers:
|
||||||
name: "users-sudo-{{ sanoid_user }}"
|
name: "users-sudo-{{ sanoid_user }}"
|
||||||
state: present
|
state: absent
|
||||||
user: "{{ sanoid_user }}"
|
user: "{{ sanoid_user }}"
|
||||||
commands: ALL
|
commands: ALL
|
||||||
nopassword: true
|
nopassword: true
|
||||||
|
@ -24,9 +24,9 @@
|
||||||
|
|
||||||
- name: template syncoid.service
|
- name: template syncoid.service
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.template:
|
ansible.builtin.file:
|
||||||
src: "syncoid.service.j2"
|
state: absent
|
||||||
dest: /etc/systemd/system/syncoid.service
|
path: /etc/systemd/system/syncoid.service
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
|
@ -37,9 +37,9 @@
|
||||||
|
|
||||||
- name: template syncoid.sh
|
- name: template syncoid.sh
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.template:
|
ansible.builtin.file:
|
||||||
src: "syncoid.sh.j2"
|
state: absent
|
||||||
dest: /usr/bin/syncoid.sh
|
path: /usr/bin/syncoid.sh
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
|
@ -48,9 +48,9 @@
|
||||||
|
|
||||||
- name: template syncoid_mail.service
|
- name: template syncoid_mail.service
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.template:
|
ansible.builtin.file:
|
||||||
src: "syncoid_mail.service.j2"
|
state: absent
|
||||||
dest: /etc/systemd/system/syncoid_mail.service
|
path: /etc/systemd/system/syncoid_mail.service
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
|
@ -61,9 +61,9 @@
|
||||||
|
|
||||||
- name: template syncoid.timer
|
- name: template syncoid.timer
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.template:
|
ansible.builtin.file:
|
||||||
src: "syncoid.timer.j2"
|
state: absent
|
||||||
dest: "/etc/systemd/system/syncoid.timer"
|
path: "/etc/systemd/system/syncoid.timer"
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
|
@ -78,8 +78,10 @@
|
||||||
name: "syncoid.timer"
|
name: "syncoid.timer"
|
||||||
enabled: true
|
enabled: true
|
||||||
masked: false
|
masked: false
|
||||||
state: started
|
state: absent
|
||||||
notify:
|
notify:
|
||||||
- systemctl daemon-reload
|
- systemctl daemon-reload
|
||||||
when:
|
when:
|
||||||
- sanoid_syncoid_destination_host
|
- sanoid_syncoid_destination_host
|
||||||
|
|
||||||
|
# remove package by hand
|
||||||
|
|
|
@ -65,13 +65,13 @@
|
||||||
- sanoid.service
|
- sanoid.service
|
||||||
- sanoid-prune.service
|
- sanoid-prune.service
|
||||||
|
|
||||||
- name: include source-host tasks
|
- name: include source-host tasks # todo
|
||||||
ansible.builtin.include_tasks: source.yml
|
ansible.builtin.include_tasks: source.yml
|
||||||
when:
|
when:
|
||||||
- sanoid_syncoid_source_host is defined and sanoid_syncoid_source_host is true
|
- sanoid_syncoid_source_host is defined and sanoid_syncoid_source_host is true
|
||||||
- sanoid_syncoid_ssh_pubkey is defined
|
- sanoid_syncoid_ssh_pubkey is defined
|
||||||
|
|
||||||
- name: include destination-host tasks
|
- name: include destination-host tasks # todo
|
||||||
ansible.builtin.include_tasks: destination.yml
|
ansible.builtin.include_tasks: destination.yml
|
||||||
when:
|
when:
|
||||||
- sanoid_syncoid_destination_host is defined and sanoid_syncoid_destination_host is true
|
- sanoid_syncoid_destination_host is defined and sanoid_syncoid_destination_host is true
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
ansible.posix.authorized_key:
|
ansible.posix.authorized_key:
|
||||||
user: "{{ sanoid_user }}"
|
user: "{{ sanoid_user }}"
|
||||||
key: "{{ sanoid_syncoid_ssh_pubkey }}"
|
key: "{{ sanoid_syncoid_ssh_pubkey }}"
|
||||||
state: present
|
state: absent
|
||||||
when:
|
when:
|
||||||
- sanoid_syncoid_source_host
|
- sanoid_syncoid_source_host
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
become: true
|
become: true
|
||||||
community.general.sudoers:
|
community.general.sudoers:
|
||||||
name: "users-sudo-{{ sanoid_user }}"
|
name: "users-sudo-{{ sanoid_user }}"
|
||||||
state: present
|
state: absent
|
||||||
user: "{{ sanoid_user }}"
|
user: "{{ sanoid_user }}"
|
||||||
commands: ALL
|
commands: ALL
|
||||||
nopassword: true
|
nopassword: true
|
||||||
|
|
Loading…
Reference in a new issue