Skip to content

Commit

Permalink
Merge branch 'galaxyproject:main' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
kysrpex committed Jun 28, 2023
2 parents d6cb353 + 8a0f105 commit c937d3f
Showing 1 changed file with 6 additions and 20 deletions.
26 changes: 6 additions & 20 deletions tasks/squid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,13 @@
setype: squid_cache_t
when: cvmfs_stratum1_cache_dir is defined

- name: Check whether the cache directories exist
ansible.builtin.stat:
path: "{{ cvmfs_stratum1_cache_dir.dir }}/00"
register: cvmfs_stratum1_cache_dir_stat
when: cvmfs_stratum1_cache_dir is defined

- name: Create the cache directories for the first time
when: cvmfs_stratum1_cache_dir is defined and not cvmfs_stratum1_cache_dir_stat.stat.exists
block:

- name: Ensure squid is stopped
ansible.builtin.service:
name: "{{ cvmfs_squid_service_name }}"
state: stopped

- name: Create the cache directories
become: true
become_user: "{{ cvmfs_squid_user }}"
ansible.builtin.command: squid -z
args:
creates: "{{ cvmfs_stratum1_cache_dir.dir }}/00"
become: true
become_user: "{{ cvmfs_squid_user }}"
ansible.builtin.command: squid -z
args:
creates: "{{ cvmfs_stratum1_cache_dir.dir }}/00"
when: cvmfs_stratum1_cache_dir is defined

- name: Ensure squid is enabled and started
ansible.builtin.service:
Expand Down

0 comments on commit c937d3f

Please sign in to comment.