Skip to content
Snippets Groups Projects
Unverified Commit e0b76b18 authored by dymq's avatar dymq Committed by GitHub
Browse files

Failover for adding proxy when line exists in file (#5751)

The 'regexp' parameter matches last occurrence of a line starting with 'proxy=' and replaces it with the one defined in 'line' parameter. If no match - it works same way as before. This fixes resuming cluster deployments failed after that task (if there was no more than one line starting with 'proxy' in the yum.conf file - this condition should also be reassured with the change introduced here) eg. if they were initiated with Terraform.
parent c47f441b
No related branches found
No related tags found
No related merge requests found
......@@ -30,6 +30,7 @@
- name: Add proxy to /etc/yum.conf if http_proxy is defined
lineinfile:
path: "/etc/yum.conf"
regexp: "^proxy=.*$"
line: "proxy={{ http_proxy }}"
create: true
state: present
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment