diff options
author | Petr Ospalý <p.ospaly@partner.samsung.com> | 2019-01-07 13:28:57 +0100 |
---|---|---|
committer | Petr Ospalý <p.ospaly@partner.samsung.com> | 2019-01-07 13:37:36 +0100 |
commit | fb01a659da5c4216ff20007341d789ac9c7df933 (patch) | |
tree | 60a256c7d7456e7015ae1dffdd2d9bce7b508b85 /ansible/run_playbook.sh | |
parent | 7acff5e6275568fccd384cdc1ec7b508a178a571 (diff) |
Add support for plain files mounting into chroot
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ý <p.ospaly@partner.samsung.com>
Diffstat (limited to 'ansible/run_playbook.sh')
-rwxr-xr-x | ansible/run_playbook.sh | 4 |
1 files changed, 2 insertions, 2 deletions
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 "$@" |