From 4e085505468a01028fc07b89e6d07dd4add4c744 Mon Sep 17 00:00:00 2001 From: Nate Coraor Date: Tue, 21 May 2024 12:28:30 -0400 Subject: [PATCH] Support running Stratum 1 without Squid --- defaults/main.yml | 4 +++- tasks/stratum1.yml | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index 91377f0..4858865 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -18,9 +18,11 @@ cvmfs_stratum1_http_ports: cvmfs_localproxy_http_ports: - 3128 -cvmfs_stratum1_apache_port: 8008 +cvmfs_stratum1_apache_port: "{{ cvmfs_stratum1_squid_enabled | ternary(8008, 80) }}" cvmfs_stratum1_cache_mem: 128 # MB +cvmfs_stratum1_squid_enabled: true + # Stratum 1 snapshot cron job timing, hash keys correspond to the cron module options: # https://docs.ansible.com/ansible/latest/collections/ansible/builtin/cron_module.html # diff --git a/tasks/stratum1.yml b/tasks/stratum1.yml index 6a502ae..2dabf78 100644 --- a/tasks/stratum1.yml +++ b/tasks/stratum1.yml @@ -28,6 +28,7 @@ ansible.builtin.include_tasks: squid.yml vars: _cvmfs_squid_conf_src: "{{ cvmfs_squid_conf_src | default('stratum1_squid.conf.j2') }}" + when: cvmfs_stratum1_squid_enabled - name: Include firewall tasks ansible.builtin.include_tasks: firewall.yml