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

fix: iterate through vault_service_files list properly by only using the keys...

fix: iterate through vault_service_files list properly by only using the keys and not their values, thus making it a list
parent 1fe53d9d
No related branches found
No related tags found
No related merge requests found
---
# https://docs.ansible.com/ansible/latest/collections/ansible/builtin/systemd_module.html
- name: systemctl daemon-reload
systemd:
ansible.builtin.systemd:
daemon-reload: "yes"
- name: enable systemd-units
command: "systemctl enable /etc/systemd/user/{{ item.key }}.service"
loop: "{{ vault_service_files }}"
ansible.builtin.command: "systemctl enable /etc/systemd/user/{{ item }}.service"
loop: "{{ vault_service_files.keys() | list }}"
# https://docs.ansible.com/ansible/latest/collections/ansible/builtin/systemd_module.html
- name: restart repairtools
systemd:
ansible.builtin.systemd:
name: "{{ item }}.service"
state: restarted
loop: "{{ vault_service_files }}"
loop: "{{ vault_service_files.keys() | list }}"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment