From: Michal Zegan Date: Mon, 27 May 2019 11:52:53 +0000 (+0200) Subject: Allow unsafe writes when modifying resolv.conf X-Git-Tag: 6.0.0-ONAP~183^2~6 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=835643ae86c433a4ff823ea5f81411aa6016fdb7;p=oom%2Foffline-installer.git Allow unsafe writes when modifying resolv.conf The package-repository role edits /etc/resolv.conf. Ansible modifies files atomically to prevent data loss on crash, but that does not work in docker containers because /etc/resolv.conf is bind-mounted. Allow ansible to fall back to non atomic writes in such cases. This makes it unnecessary to hack around this. Change-Id: I066205322de5cc06569e6ea3aa38885d3834f9cd Issue-ID: OOM-1816 Signed-off-by: Michal Zegan --- diff --git a/ansible/roles/package-repository/tasks/main.yml b/ansible/roles/package-repository/tasks/main.yml index 599e1052..7dc2e76f 100644 --- a/ansible/roles/package-repository/tasks/main.yml +++ b/ansible/roles/package-repository/tasks/main.yml @@ -5,6 +5,7 @@ path: /etc/resolv.conf state: present insertbefore: BOF + unsafe_writes: true - name: Disable all OS default repositories block: