Преглед изворни кода

Use ansible.builtin.file to clear directory

pull/2723/head
Julian-Samuel Gebühr пре 2 година
родитељ
комит
427d15ce81
2 измењених фајлова са 10 додато и 2 уклоњено
  1. +9
    -1
      roles/custom/matrix-bot-matrix-registration-bot/tasks/clean_cache.yml
  2. +1
    -1
      roles/custom/matrix-bot-matrix-registration-bot/tasks/setup_install.yml

+ 9
- 1
roles/custom/matrix-bot-matrix-registration-bot/tasks/clean_cache.yml Прегледај датотеку

@@ -1,4 +1,12 @@
--- ---


- name: Delete cache files - name: Delete cache files
ansible.builtin.shell: "rm -rf {{ matrix_bot_matrix_registration_bot_data_path }}/*"
ansible.builtin.file:
state: "{{ item }}"
path: "{{ matrix_bot_matrix_registration_bot_data_path }}"
mode: 0750
owner: "{{ matrix_user_username }}"
group: "{{ matrix_user_groupname }}"
with_items:
- absent
- directory

+ 1
- 1
roles/custom/matrix-bot-matrix-registration-bot/tasks/setup_install.yml Прегледај датотеку

@@ -9,7 +9,7 @@
group: "{{ matrix_user_groupname }}" group: "{{ matrix_user_groupname }}"
with_items: with_items:
- {path: "{{ matrix_bot_matrix_registration_bot_config_path }}", when: true} - {path: "{{ matrix_bot_matrix_registration_bot_config_path }}", when: true}
- - {path: "{{ matrix_bot_matrix_registration_bot_data_path }}", when: true}
- {path: "{{ matrix_bot_matrix_registration_bot_data_path }}", when: true}
- {path: "{{ matrix_bot_matrix_registration_bot_docker_src_files_path }}", when: true} - {path: "{{ matrix_bot_matrix_registration_bot_docker_src_files_path }}", when: true}
when: "item.when | bool" when: "item.when | bool"




Loading…
Откажи
Сачувај