--- # Copyright 2018, BBC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # NOTE(noonedeadpunk): We can not offload this to openstack_hosts, as Squid should be already # operational for it. - name: Prepare Squid interface ansible.builtin.include_role: name: systemd_networkd vars: systemd_networkd_prefix: "osa_proxy" systemd_networkd_epel_mirror: "{{ (nodepool_vars is defined) | ternary(nodepool_vars.NODEPOOL_EPEL_MIRROR, 'http://download.fedoraproject.org/pub/epel') }}" systemd_interface_cleanup: true systemd_run_networkd: true systemd_netdevs: - NetDev: Name: dummy-squid Kind: dummy systemd_networks: - interface: "dummy-squid" address: "{{ squid_network }}" - name: Install squid packages ansible.builtin.package: name: squid state: present update_cache: "{{ (ansible_facts['pkg_mgr'] == 'apt') | ternary('yes', omit) }}" notify: Restart squid tags: - install-packages - name: Install squid config ansible.builtin.template: src: "squid.conf.j2" dest: "/etc/squid/squid.conf" mode: "0644"