From 835643ae86c433a4ff823ea5f81411aa6016fdb7 Mon Sep 17 00:00:00 2001 From: Michal Zegan Date: Mon, 27 May 2019 13:52:53 +0200 Subject: 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 --- ansible/roles/package-repository/tasks/main.yml | 1 + 1 file changed, 1 insertion(+) (limited to 'ansible/roles/package-repository') 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: -- cgit 1.2.3-korg