--- - name: Proxy in the global shell environment block: - name: Install the proxy environment file template: src=10-caching-proxy.sh.j2 dest=/etc/profile.d/10-caching-proxy.sh owner=root group=root mode=0444 when: - proxy_env is defined - enable_env_proxy | bool - name: Remove the proxy environment file if not required template: src=10-caching-proxy.sh.j2 dest=/etc/profile.d/10-caching-proxy.sh owner=root group=root mode=0444 when: not enable_env_proxy | bool tags: [ 'systemsetup', 'proxyenv' ]