remove syncoid, switch to rsync #221

Merged
mg merged 132 commits from sanoid_weg into master 2024-10-31 12:01:46 +01:00
3 changed files with 23 additions and 21 deletions
Showing only changes of commit 5bfb4a021a - Show all commits

View file

@ -1,9 +1,9 @@
---
- name: template ssh private key
become: true
ansible.builtin.template:
src: private_key.j2
dest: "/etc/sanoid/.ssh/id_sanoid"
ansible.builtin.file:
state: absent
path: "/etc/sanoid/.ssh/id_sanoid"
owner: "{{ sanoid_user }}"
group: "{{ sanoid_user_group }}"
mode: "0400"
@ -15,7 +15,7 @@
become: true
community.general.sudoers:
name: "users-sudo-{{ sanoid_user }}"
state: present
state: absent
user: "{{ sanoid_user }}"
commands: ALL
nopassword: true
@ -24,9 +24,9 @@
- name: template syncoid.service
become: true
ansible.builtin.template:
src: "syncoid.service.j2"
dest: /etc/systemd/system/syncoid.service
ansible.builtin.file:
state: absent
path: /etc/systemd/system/syncoid.service
owner: root
group: root
mode: "0644"
@ -37,9 +37,9 @@
- name: template syncoid.sh
become: true
ansible.builtin.template:
src: "syncoid.sh.j2"
dest: /usr/bin/syncoid.sh
ansible.builtin.file:
state: absent
path: /usr/bin/syncoid.sh
owner: root
group: root
mode: "0755"
@ -48,9 +48,9 @@
- name: template syncoid_mail.service
become: true
ansible.builtin.template:
src: "syncoid_mail.service.j2"
dest: /etc/systemd/system/syncoid_mail.service
ansible.builtin.file:
state: absent
path: /etc/systemd/system/syncoid_mail.service
owner: root
group: root
mode: "0644"
@ -61,9 +61,9 @@
- name: template syncoid.timer
become: true
ansible.builtin.template:
src: "syncoid.timer.j2"
dest: "/etc/systemd/system/syncoid.timer"
ansible.builtin.file:
state: absent
path: "/etc/systemd/system/syncoid.timer"
owner: root
group: root
mode: "0644"
@ -78,8 +78,10 @@
name: "syncoid.timer"
enabled: true
masked: false
state: started
state: absent
notify:
- systemctl daemon-reload
when:
- sanoid_syncoid_destination_host
# remove package by hand

View file

@ -65,13 +65,13 @@
- sanoid.service
- sanoid-prune.service
- name: include source-host tasks
- name: include source-host tasks # todo
ansible.builtin.include_tasks: source.yml
when:
- sanoid_syncoid_source_host is defined and sanoid_syncoid_source_host is true
- sanoid_syncoid_ssh_pubkey is defined
- name: include destination-host tasks
- name: include destination-host tasks # todo
ansible.builtin.include_tasks: destination.yml
when:
- sanoid_syncoid_destination_host is defined and sanoid_syncoid_destination_host is true

View file

@ -4,7 +4,7 @@
ansible.posix.authorized_key:
user: "{{ sanoid_user }}"
key: "{{ sanoid_syncoid_ssh_pubkey }}"
state: present
state: absent
when:
- sanoid_syncoid_source_host
@ -12,7 +12,7 @@
become: true
community.general.sudoers:
name: "users-sudo-{{ sanoid_user }}"
state: present
state: absent
user: "{{ sanoid_user }}"
commands: ALL
nopassword: true