From fb01a659da5c4216ff20007341d789ac9c7df933 Mon Sep 17 00:00:00 2001 From: Petr OspalĂ˝ Date: Mon, 7 Jan 2019 13:28:57 +0100 Subject: Add support for plain files mounting into chroot MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In this commit I tried to follow a behaviour of docker. If mounted path does not exist then it will handle it as a directory - it creates it and the mountpoint is expected to be a directory also. If the mounted path is a plain file it will do file bind mounting. The mountpoint must be a plain file. Change-Id: Ie8b29442c8ebb8da389ba6c9a152a49d8cf6e9be Issue-ID: OOM-1575 Signed-off-by: Petr OspalĂ˝ --- ansible/run_playbook.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ansible/run_playbook.sh') diff --git a/ansible/run_playbook.sh b/ansible/run_playbook.sh index 88c86bc3..9a2ca56f 100755 --- a/ansible/run_playbook.sh +++ b/ansible/run_playbook.sh @@ -119,13 +119,13 @@ if ! [ -d "$ANSIBLE_CHROOT" ] ; then fi # run chroot -mkdir -p "$ANSIBLE_DIR"/application -mkdir -p "$ANSIBLE_DIR"/certs "$ANSIBLE_DIR"/docker/run_chroot.sh \ --mount rw:"${HOME}/.ssh":/root/.ssh \ --mount ro:"$ANSIBLE_DIR":/ansible \ --mount rw:"$ANSIBLE_DIR"/application:/ansible/application \ --mount rw:"$ANSIBLE_DIR"/certs:/certs \ + --mount ro:/etc/resolv.conf:/etc/resolv.conf \ + --mount ro:/etc/hosts:/etc/hosts \ --workdir /ansible \ execute "$ANSIBLE_CHROOT" ansible-playbook "$@" -- cgit 1.2.3-korg