Skip to content

Commit

Permalink
feat: improve looped mount task labels
Browse files Browse the repository at this point in the history
Reduces the amount of text in console and makes the process easier to follow.
  • Loading branch information
tigattack authored and stefangweichinger committed Nov 15, 2024
1 parent a03739b commit f7cc58a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tasks/mount.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
ansible.builtin.command:
cmd: "rclone mkdir '{{ item.remote_name }}':{{ item.remote_path }}"
loop: "{{ rclone_mounts }}"
loop_control:
label: "{{ item.remote_name }}:{{ item.remote_path }}"
when: rclone_mkdir
register: rclone_mkdir_output
changed_when: rclone_mkdir_output.rc == 0
Expand All @@ -28,6 +30,8 @@
group: root
mode: '0644'
loop: "{{ rclone_mounts }}"
loop_control:
label: "{{ item.name }}"
when: item.remote_path is defined and item.local_path is defined
notify: "Reload and restart rclone-mount services"

Expand All @@ -46,4 +50,6 @@
enabled: yes
state: restarted
loop: "{{ found_services.files }}"
loop_control:
label: "{{ item.path | basename }}"
notify: Reload and restart rclone-mount services

0 comments on commit f7cc58a

Please sign in to comment.