Skip to content
Snippets Groups Projects
Commit e6d81a52 authored by Jörg Sachse's avatar Jörg Sachse
Browse files

chore: remove unnecessary task and satisfy linter

parent ef311fcd
No related branches found
No related tags found
1 merge request!2merge feat_ND-2363_ND-2323 into master
---
- name: disable legacy SystemD units
ansible.builtin.systemd:
unit: "{{ item }}"
state: stopped
enabled: false
loop:
- "move_old_logs.service"
- "move_old_logs.timer"
ignore_errors: true
- name: remove legacy timer/service/script
ansible.builtin.file:
path: "{{ item }}"
......@@ -64,26 +55,26 @@
enabled: true
state: started
#- name: find move_old_logs systemd units so we don't have to hardcode their names in the loops
# ansible.builtin.find:
# path: "/usr/local/lib/systemd/system/"
# pattern: "move_old_logs.*"
# register: move_old_logs_units
# - name: find move_old_logs systemd units so we don't have to hardcode their names in the loops
# ansible.builtin.find:
# path: "/usr/local/lib/systemd/system/"
# pattern: "move_old_logs.*"
# register: move_old_logs_units
#
#- name: check if move_old_logs units are already enabled
# ansible.builtin.command: "systemctl is-enabled {{ item.path | basename }}"
# loop: "{{ move_old_logs_units.files }}"
# register: move_old_logs_enabled
# changed_when: false
# failed_when:
# - move_old_logs_enabled.stdout != "enabled"
# - move_old_logs_enabled.stdout != "disabled"
# - '"No such file or directory" not in move_old_logs_enabled.stderr'
# - name: check if move_old_logs units are already enabled
# ansible.builtin.command: "systemctl is-enabled {{ item.path | basename }}"
# loop: "{{ move_old_logs_units.files }}"
# register: move_old_logs_enabled
# changed_when: false
# failed_when:
# - move_old_logs_enabled.stdout != "enabled"
# - move_old_logs_enabled.stdout != "disabled"
# - '"No such file or directory" not in move_old_logs_enabled.stderr'
#
#- name: manually enable move_old_logs.service, because it cannot be found by the ansible.builtin.systemd module when the timer is located below "/etc/systemd/user/"
# ansible.builtin.command: "systemctl enable {{ item.item.path }}"
# loop: "{{ move_old_logs_enabled.results }}"
# when:
# - item.stdout != "enabled"
# register: move_old_logs_enablecmd
# changed_when: move_old_logs_enablecmd.stdout in "Created symlink"
# - name: manually enable move_old_logs.service, because it cannot be found by the ansible.builtin.systemd module when the timer is located below "/etc/systemd/user/"
# ansible.builtin.command: "systemctl enable {{ item.item.path }}"
# loop: "{{ move_old_logs_enabled.results }}"
# when:
# - item.stdout != "enabled"
# register: move_old_logs_enablecmd
# changed_when: move_old_logs_enablecmd.stdout in "Created symlink"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment