Skip to content

Commit

Permalink
proxy fix
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishek-sa1 committed Jul 10, 2024
1 parent 10651f8 commit 58bbda3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,11 @@
ansible.builtin.include_tasks: configure_user_registry_port.yml

- name: Configure squid proxy
ansible.builtin.replace:
ansible.builtin.lineinfile:
path: "{{ squid_proxy_conf_path }}"
regexp: "{{ squid_proxy_conf_regxp }}"
replace: "{{ squid_proxy_conf_replace }}"
insertafter: EOF
line: "{{ squid_proxy_conf_replace }}"
register: configure_proxy

- name: Restart squid service
Expand Down
2 changes: 1 addition & 1 deletion prepare_cp/roles/configure_proxy/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

# Usage: configue_proxy_ubuntu.yml
squid_proxy_conf_path: /etc/squid/squid.conf
squid_proxy_conf_regxp: "^#http_access allow localnet"
squid_proxy_conf_regxp: "^#(.*)http_access allow localnet"
squid_proxy_conf_replace: "http_access allow localnet"
repo_update_fail_msg: "Failed. Unable to run apt update.
Please make sure all required repos are reachable. Remove or Update unreachable repos configured and re-run the playbook."
Expand Down

0 comments on commit 58bbda3

Please sign in to comment.