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.
This commit is contained in:
parent
c47f441b13
commit
e0b76b185a
1 changed files with 1 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue