This commit is contained in:
Michael Grote 2022-04-01 18:12:09 +02:00
parent 050a93df07
commit 6f04f45c3d
3 changed files with 2 additions and 44 deletions

View File

@ -45,17 +45,3 @@
frequent_period: '0'
autosnap: 'yes'
autoprune: 'yes'
# weg
### under which user the script is run
sanoid_user_group: "root"
sanoid_user: "sanoid"
### where to store the logfile
sanoid_log_file: "/var/log/sanoid-cron.log"
### where to download the binary + config
sanoid_dl_url: "https://raw.githubusercontent.com/jimsalterjrs/sanoid/master/sanoid"
sanoid_dl_conf_url: "https://raw.githubusercontent.com/jimsalterjrs/sanoid/master/sanoid.defaults.conf"

View File

@ -1,7 +1,4 @@
---
- name: include user tasks # entfernen
include_tasks: user.yml
- name: install packages
become: true
ansible.builtin.package:
@ -14,6 +11,6 @@
ansible.builtin.template:
src: sanoid.conf.j2
dest: /etc/sanoid/sanoid.conf
owner: "{{ sanoid_user }}"
group: "{{ sanoid_user_group }}"
owner: root
group: root
mode: 0644

View File

@ -1,25 +0,0 @@
---
- name: ensure user exists # ENTRFERNERN!!!!!
become: true
ansible.builtin.user:
name: "{{ sanoid_user }}"
group: "{{ sanoid_user_group }}"
shell: /usr/sbin/nologin
create_home: no
state: absent
- name: add user to sudoers # ENTRFERNERN!!!!!
become: true
ansible.builtin.blockinfile:
path: /etc/sudoers
state: absent
block: |
{{ sanoid_user }} ALL=(ALL) NOPASSWD:ALL
validate: '/usr/sbin/visudo -cf %s'
backup: yes
marker_begin: sanoid-sudoers BEGIN
marker_end: sanoid-sudoers END
when:
- sanoid_user_group is defined
- sanoid_user is defined