Skip to content

Commit 58679a5

Browse files
committed
Revert "Fix role failing on Squid task "Create the cache directories for the first time""
This reverts commit f220483.
1 parent f220483 commit 58679a5

File tree

1 file changed

+7
-21
lines changed

1 file changed

+7
-21
lines changed

Diff for: tasks/squid.yml

+7-21
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
backup: true
77
mode: 0644
88
notify:
9-
- Restart squid
9+
- restart squid
1010

1111
- name: Fix cache directory permission
1212
ansible.builtin.file:
@@ -18,27 +18,13 @@
1818
setype: squid_cache_t
1919
when: cvmfs_stratum1_cache_dir is defined
2020

21-
- name: Check whether the cache directories exist
22-
ansible.builtin.stat:
23-
path: "{{ cvmfs_stratum1_cache_dir.dir }}/00"
24-
register: cvmfs_stratum1_cache_dir_stat
25-
when: cvmfs_stratum1_cache_dir is defined
26-
2721
- name: Create the cache directories for the first time
28-
when: cvmfs_stratum1_cache_dir is defined and not cvmfs_stratum1_cache_dir_stat.stat.exists
29-
block:
30-
31-
- name: Ensure squid is stopped
32-
ansible.builtin.service:
33-
name: "{{ cvmfs_squid_service_name }}"
34-
state: stopped
35-
36-
- name: Create the cache directories
37-
become: true
38-
become_user: "{{ cvmfs_squid_user }}"
39-
ansible.builtin.command: squid -z
40-
args:
41-
creates: "{{ cvmfs_stratum1_cache_dir.dir }}/00"
22+
become: true
23+
become_user: "{{ cvmfs_squid_user }}"
24+
ansible.builtin.command: squid -z
25+
args:
26+
creates: "{{ cvmfs_stratum1_cache_dir }}/00"
27+
when: cvmfs_stratum1_cache_dir is defined
4228

4329
- name: Ensure squid is enabled and started
4430
ansible.builtin.service:

0 commit comments

Comments
 (0)