summaryrefslogtreecommitdiffstats
path: root/ansible/roles
diff options
context:
space:
mode:
authorMichal Zegan <m.zegan@samsung.com>2019-05-27 13:52:53 +0200
committerMichal Ptacek <m.ptacek@partner.samsung.com>2019-05-29 10:43:08 +0000
commit835643ae86c433a4ff823ea5f81411aa6016fdb7 (patch)
treef7a721b295b2cbc6b09065553ff9f950acf8ee36 /ansible/roles
parent50651c1e6cab765bb1148607fc00588fd576970b (diff)
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 <m.zegan@samsung.com>
Diffstat (limited to 'ansible/roles')
-rw-r--r--ansible/roles/package-repository/tasks/main.yml1
1 files changed, 1 insertions, 0 deletions
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: