diff options
author | Steve Milner <smilner@redhat.com> | 2017-05-16 10:55:35 -0400 |
---|---|---|
committer | Steve Milner <smilner@redhat.com> | 2017-05-16 10:57:44 -0400 |
commit | 9bc76803f5a14648e367668028fd4386d2cfe56e (patch) | |
tree | 269a4839ad0fa1cd445f728391208799f32a65f8 /roles/docker/tasks | |
parent | 69c26f3bc3b9cefc9df9b3fc1c7d3dd6dea625fe (diff) | |
download | openshift-9bc76803f5a14648e367668028fd4386d2cfe56e.tar.gz openshift-9bc76803f5a14648e367668028fd4386d2cfe56e.tar.bz2 openshift-9bc76803f5a14648e367668028fd4386d2cfe56e.tar.xz openshift-9bc76803f5a14648e367668028fd4386d2cfe56e.zip |
Add regexp for container-engine lineinfile
This ensures that if the line already exists it will be updated with the
expected results from the installer.
Diffstat (limited to 'roles/docker/tasks')
-rw-r--r-- | roles/docker/tasks/systemcontainer_docker.yml | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/roles/docker/tasks/systemcontainer_docker.yml b/roles/docker/tasks/systemcontainer_docker.yml index 9070a871f..3af3e00b2 100644 --- a/roles/docker/tasks/systemcontainer_docker.yml +++ b/roles/docker/tasks/systemcontainer_docker.yml @@ -42,11 +42,14 @@ ignore_errors: True # Set http_proxy, https_proxy, and no_proxy in /etc/atomic.conf +# regexp: the line starts with or without #, followed by the string +# http_proxy, then either : or = - block: - name: Add http_proxy to /etc/atomic.conf lineinfile: dest: /etc/atomic.conf + regexp: "^#?http_proxy[:=]{1}" line: "http_proxy: {{ openshift.common.http_proxy | default('') }}" when: - openshift.common.http_proxy is defined @@ -55,6 +58,7 @@ - name: Add https_proxy to /etc/atomic.conf lineinfile: dest: /etc/atomic.conf + regexp: "^#?https_proxy[:=]{1}" line: "https_proxy: {{ openshift.common.https_proxy | default('') }}" when: - openshift.common.https_proxy is defined @@ -63,6 +67,7 @@ - name: Add no_proxy to /etc/atomic.conf lineinfile: dest: /etc/atomic.conf + regexp: "^#?no_proxy[:=]{1}" line: "no_proxy: {{ openshift.common.no_proxy | default('') }}" when: - openshift.common.no_proxy is defined |