From 670cec8c6a505d2f3bc5f5e025c7ce74975a2828 Mon Sep 17 00:00:00 2001 From: dschroeder Date: Thu, 20 Jul 2017 16:53:58 +0000 Subject: [PATCH 1/4] converts starter scripts with symlinks to ansible-silo --- silo/bin/ansible | 36 +----------------------------------- silo/bin/ansible-console | 36 +----------------------------------- silo/bin/ansible-doc | 36 +----------------------------------- silo/bin/ansible-galaxy | 36 +----------------------------------- silo/bin/ansible-lint | 36 +----------------------------------- silo/bin/ansible-playbook | 36 +----------------------------------- silo/bin/ansible-pull | 36 +----------------------------------- silo/bin/ansible-silo | 7 +++++++ silo/bin/ansible-vault | 36 +----------------------------------- silo/install.sh | 9 +++++++-- tests/functional | 26 +++++--------------------- 11 files changed, 27 insertions(+), 303 deletions(-) mode change 100755 => 120000 silo/bin/ansible mode change 100755 => 120000 silo/bin/ansible-console mode change 100755 => 120000 silo/bin/ansible-doc mode change 100755 => 120000 silo/bin/ansible-galaxy mode change 100755 => 120000 silo/bin/ansible-lint mode change 100755 => 120000 silo/bin/ansible-playbook mode change 100755 => 120000 silo/bin/ansible-pull mode change 100755 => 120000 silo/bin/ansible-vault diff --git a/silo/bin/ansible b/silo/bin/ansible deleted file mode 100755 index 9e2766b..0000000 --- a/silo/bin/ansible +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env bash -# -# Starts ansible inside ansible-silo -# -# Copyright (c) 2017, Groupon, Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# Neither the name of GROUPON nor the names of its contributors may be -# used to endorse or promote products derived from this software without -# specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -# TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -ansible-silo ansible "$@" diff --git a/silo/bin/ansible b/silo/bin/ansible new file mode 120000 index 0000000..3030f4f --- /dev/null +++ b/silo/bin/ansible @@ -0,0 +1 @@ +ansible-silo \ No newline at end of file diff --git a/silo/bin/ansible-console b/silo/bin/ansible-console deleted file mode 100755 index 26eead1..0000000 --- a/silo/bin/ansible-console +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env bash -# -# Starts ansible-console inside ansible-silo -# -# Copyright (c) 2017, Groupon, Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# Neither the name of GROUPON nor the names of its contributors may be -# used to endorse or promote products derived from this software without -# specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -# TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -ansible-silo ansible-console "$@" diff --git a/silo/bin/ansible-console b/silo/bin/ansible-console new file mode 120000 index 0000000..3030f4f --- /dev/null +++ b/silo/bin/ansible-console @@ -0,0 +1 @@ +ansible-silo \ No newline at end of file diff --git a/silo/bin/ansible-doc b/silo/bin/ansible-doc deleted file mode 100755 index 5d2cec2..0000000 --- a/silo/bin/ansible-doc +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env bash -# -# Starts ansible-doc inside ansible-silo -# -# Copyright (c) 2017, Groupon, Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# Neither the name of GROUPON nor the names of its contributors may be -# used to endorse or promote products derived from this software without -# specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -# TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -ansible-silo ansible-doc "$@" diff --git a/silo/bin/ansible-doc b/silo/bin/ansible-doc new file mode 120000 index 0000000..3030f4f --- /dev/null +++ b/silo/bin/ansible-doc @@ -0,0 +1 @@ +ansible-silo \ No newline at end of file diff --git a/silo/bin/ansible-galaxy b/silo/bin/ansible-galaxy deleted file mode 100755 index 995e5d5..0000000 --- a/silo/bin/ansible-galaxy +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env bash -# -# Starts ansible-galaxy inside ansible-silo -# -# Copyright (c) 2017, Groupon, Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# Neither the name of GROUPON nor the names of its contributors may be -# used to endorse or promote products derived from this software without -# specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -# TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -ansible-silo ansible-galaxy "$@" diff --git a/silo/bin/ansible-galaxy b/silo/bin/ansible-galaxy new file mode 120000 index 0000000..3030f4f --- /dev/null +++ b/silo/bin/ansible-galaxy @@ -0,0 +1 @@ +ansible-silo \ No newline at end of file diff --git a/silo/bin/ansible-lint b/silo/bin/ansible-lint deleted file mode 100755 index 0ad6640..0000000 --- a/silo/bin/ansible-lint +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env bash -# -# Starts ansible-lint inside ansible-silo -# -# Copyright (c) 2017, Groupon, Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# Neither the name of GROUPON nor the names of its contributors may be -# used to endorse or promote products derived from this software without -# specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -# TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -ansible-silo ansible-lint "$@" diff --git a/silo/bin/ansible-lint b/silo/bin/ansible-lint new file mode 120000 index 0000000..3030f4f --- /dev/null +++ b/silo/bin/ansible-lint @@ -0,0 +1 @@ +ansible-silo \ No newline at end of file diff --git a/silo/bin/ansible-playbook b/silo/bin/ansible-playbook deleted file mode 100755 index 5d777d7..0000000 --- a/silo/bin/ansible-playbook +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env bash -# -# Starts ansible-playbook inside ansible-silo -# -# Copyright (c) 2017, Groupon, Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# Neither the name of GROUPON nor the names of its contributors may be -# used to endorse or promote products derived from this software without -# specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -# TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -ansible-silo ansible-playbook "$@" diff --git a/silo/bin/ansible-playbook b/silo/bin/ansible-playbook new file mode 120000 index 0000000..3030f4f --- /dev/null +++ b/silo/bin/ansible-playbook @@ -0,0 +1 @@ +ansible-silo \ No newline at end of file diff --git a/silo/bin/ansible-pull b/silo/bin/ansible-pull deleted file mode 100755 index b165cf2..0000000 --- a/silo/bin/ansible-pull +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env bash -# -# Starts ansible-pull inside ansible-silo -# -# Copyright (c) 2017, Groupon, Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# Neither the name of GROUPON nor the names of its contributors may be -# used to endorse or promote products derived from this software without -# specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -# TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -ansible-silo ansible-pull "$@" diff --git a/silo/bin/ansible-pull b/silo/bin/ansible-pull new file mode 120000 index 0000000..3030f4f --- /dev/null +++ b/silo/bin/ansible-pull @@ -0,0 +1 @@ +ansible-silo \ No newline at end of file diff --git a/silo/bin/ansible-silo b/silo/bin/ansible-silo index 51ead1a..4d7a129 100755 --- a/silo/bin/ansible-silo +++ b/silo/bin/ansible-silo @@ -70,6 +70,13 @@ silo() { exit fi + tool="$(basename "$0")" + # If this is one of the symlinks, e.g. ansible-playbook + if [[ "${tool}" != "ansible-silo" ]]; then + # Prepend it to the args + set -- "${tool}" "$@" + fi + command="$(docker run -it --rm -v "/tmp:/tmp" -i \ "${SILO_IMAGE}:${SILO_VERSION}" --run "$@")" diff --git a/silo/bin/ansible-vault b/silo/bin/ansible-vault deleted file mode 100755 index 803096d..0000000 --- a/silo/bin/ansible-vault +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env bash -# -# Starts ansible-vault inside ansible-silo -# -# Copyright (c) 2017, Groupon, Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# Neither the name of GROUPON nor the names of its contributors may be -# used to endorse or promote products derived from this software without -# specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -# TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -ansible-silo ansible-vault "$@" diff --git a/silo/bin/ansible-vault b/silo/bin/ansible-vault new file mode 120000 index 0000000..3030f4f --- /dev/null +++ b/silo/bin/ansible-vault @@ -0,0 +1 @@ +ansible-silo \ No newline at end of file diff --git a/silo/install.sh b/silo/install.sh index ebf7d9b..e6dfb2d 100644 --- a/silo/install.sh +++ b/silo/install.sh @@ -47,7 +47,12 @@ for src in /silo/bin/*; do else echo "${file} will be created" fi - render_template "${src}" "${target}" - chmod +x "${target}" + if [[ -L "${src}" ]]; then + cp -a "${src}" "${target}" + else + render_template "${src}" "${target}" + chmod +x "${target}" + fi + done echo "Done" diff --git a/tests/functional b/tests/functional index b247ee1..9c1fa1d 100755 --- a/tests/functional +++ b/tests/functional @@ -77,27 +77,11 @@ test_silo_bundle_function() { @test "ansible is pointing to ansible-silo" { - # Make sure the ansible* command is calling ansible-silo in its last line - run cat "$BATS_ANSIBLE_SILO_INSTALL_PATH/ansible" - [[ "${lines[-1]}" == *$'ansible-silo ansible'* ]] - - run cat "$BATS_ANSIBLE_SILO_INSTALL_PATH/ansible-doc" - [[ "${lines[-1]}" == *$'ansible-silo ansible-doc'* ]] - - run cat "$BATS_ANSIBLE_SILO_INSTALL_PATH/ansible-galaxy" - [[ "${lines[-1]}" == *$'ansible-silo ansible-galaxy'* ]] - - run cat "$BATS_ANSIBLE_SILO_INSTALL_PATH/ansible-lint" - [[ "${lines[-1]}" == *$'ansible-silo ansible-lint'* ]] - - run cat "$BATS_ANSIBLE_SILO_INSTALL_PATH/ansible-playbook" - [[ "${lines[-1]}" == *$'ansible-silo ansible-playbook'* ]] - - run cat "$BATS_ANSIBLE_SILO_INSTALL_PATH/ansible-pull" - [[ "${lines[-1]}" == *$'ansible-silo ansible-pull'* ]] - - run cat "$BATS_ANSIBLE_SILO_INSTALL_PATH/ansible-vault" - [[ "${lines[-1]}" == *$'ansible-silo ansible-vault'* ]] + # Make sure the ansible* commands are symbolic links pointing to ansible-silo + for tool in "ansible" "ansible-doc" "ansible-galaxy" "ansible-lint" "ansible-playbook" "ansible-pull" "ansible-vault"; do + [[ -L "$BATS_ANSIBLE_SILO_INSTALL_PATH/$tool" ]] + [[ "$(readlink -- "$BATS_ANSIBLE_SILO_INSTALL_PATH/$tool")" = "ansible-silo" ]] + done # Make sure the setup module executed against localhost shows docker as # virtualization type From 2efe9672ba911271d809b85442f05c79ae0dca38 Mon Sep 17 00:00:00 2001 From: dschroeder Date: Thu, 20 Jul 2017 17:04:47 +0000 Subject: [PATCH 2/4] fixes command description in help message --- silo/help.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/silo/help.txt b/silo/help.txt index 924f7de..9462ad1 100644 --- a/silo/help.txt +++ b/silo/help.txt @@ -14,10 +14,10 @@ Options: change the configured Ansible version Commands: - console Calls ansible-console - doc Calls ansible-doc - galaxy Calls ansible-galaxy - lint Calls ansible-lint - playbook Calls ansible-playbook - pull Calls ansible-pull - vault Calls ansible-vault + ansible-console Calls ansible-console + ansible-doc Calls ansible-doc + ansible-galaxy Calls ansible-galaxy + ansible-lint Calls ansible-lint + ansible-playbook Calls ansible-playbook + ansible-pull Calls ansible-pull + ansible-vault Calls ansible-vault From 7a5771b4d2170a47904f2e9a2be70407692d76d3 Mon Sep 17 00:00:00 2001 From: dschroeder Date: Thu, 20 Jul 2017 17:14:41 +0000 Subject: [PATCH 3/4] improves wording and formatting and updates version number to next release --- README.md | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 0a62fa7..e924362 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,11 @@ Ansible Silo [![GitHub release](https://img.shields.io/github/tag/groupon/ansible-silo.svg)](https://github.com/groupon/ansible-silo/releases) [![Build Status](https://travis-ci.org/groupon/ansible-silo.svg?branch=master)](https://travis-ci.org/groupon/ansible-silo) [![Docker Build Status](https://img.shields.io/docker/build/grpn/ansible-silo.svg)](https://hub.docker.com/r/grpn/ansible-silo/builds/) [![Docker Automated build](https://img.shields.io/docker/automated/grpn/ansible-silo.svg)](https://hub.docker.com/r/grpn/ansible-silo/builds/) - + Table of Contents ----------------- @@ -45,7 +49,7 @@ Silo provides you a controlled environment for Ansible and its dependencies. It Silo also makes it easy to run multiple Ansible versions in parallel on the same system. -Furthermore you can bundle your playbooks (incl. configuration, roles, plugins etc) in a custom Docker image which inherits Silo and therefore have a shippable complete and self-contained executable bundle which runs your playbooks in any environment. +Furthermore you can bundle your playbooks (incl. configuration, roles, plugins etc) in a custom Docker image which inherits Silo and therefore generate a versioned, shippable, complete and self-contained executable package which runs your playbooks in any environment. (where you have access to a Docker daemon) For convenience ansible-silo includes [ansible-lint]. Since ansible-lint uses the ansible libraries it may react differently depending on the used ansible version. @@ -56,7 +60,7 @@ If you expect reproducible outcome of an automation system, you not only need to One approach to solve above problem are shared control hosts. Control hosts though add another problem: All teams and users who use the Ansible control hosts need to align on one specific Ansible version and it gets extremely complicated to update Ansible on the control hosts since all teams and users need to align and test all their roles and playbooks against the new version. -Silo not only removes moving parts by having 100% fixed dependencies hardcoded in a Docker image. It also enables you to switch Ansible to any version without affecting other users, therefore making it easy to test your playbooks and roles against new Ansible releases and run different Ansible versions per playbook or project. +Silo not only removes moving parts by having 100% fixed dependencies hardcoded in a Docker image. It also enables you to switch Ansible to any version without affecting other users, therefore making it easy to test your playbooks and roles against new Ansible releases and run differing Ansible versions per playbook, project or user. ## How it works @@ -221,7 +225,7 @@ Functions matching `_silo_*` will not be included in bundle mode. Functions matc ```bash $ ansible-silo --version -ansible-silo 1.3.0 +ansible-silo 1.3.3 ansible 2.3.0.0 ansible-lint 3.4.13 ansible installed on volume silo.some.user @@ -249,7 +253,7 @@ You can log into the running silo container by calling silo with the `--shell` o ```bash $ ansible-silo --shell -[ansible-silo 1.3.0|~/playbooks]$ +[ansible-silo 1.3.3|~/playbooks]$ ``` @@ -264,13 +268,13 @@ $ SILO_VOLUME="1.9.6" ansible-silo --switch v1.9.6-1 Switched to Ansible 1.9.6 $ ansible-silo --version -ansible-silo 1.3.0 +ansible-silo 1.3.3 ansible 2.3.0.0 ansible-lint 3.4.13 ansible installed on volume silo.1.9.6 $ SILO_VOLUME="1.9.6" ansible-silo --version -ansible-silo 1.3.0 +ansible-silo 1.3.3 ansible 1.9.6 ansible-lint 3.4.13 ansible installed on volume silo.1.9.6 @@ -366,7 +370,7 @@ SILO_DEBUG=true ansible --shell exit Which will show the something along these lines: Executing: /tmp/ansible-silo-runner-OTgyNGY3NGIyYjczMmM3Nzk5NGQ3ZTgy "--shell" "exit" - Executing: /usr/bin/docker run --interactive --tty --rm --volume "/tmp:/home/user/playbooks" --env SILO_DEBUG --volume "silo.some.user:/silo/ansible" --env "SILO_VOLUME=silo.some.user" --hostname "silo.host.example" --volume "/tmp/ssh-vKRVrRCSMA":"/tmp/ssh-vKRVrRCSMA" --env SSH_AUTH_SOCK --env USER_NAME="some.user" --env USER_ID="1234" "ansible-silo:1.3.0" "--shell" "exit" + Executing: /usr/bin/docker run --interactive --tty --rm --volume "/tmp:/home/user/playbooks" --env SILO_DEBUG --volume "silo.some.user:/silo/ansible" --env "SILO_VOLUME=silo.some.user" --hostname "silo.host.example" --volume "/tmp/ssh-vKRVrRCSMA":"/tmp/ssh-vKRVrRCSMA" --env SSH_AUTH_SOCK --env USER_NAME="some.user" --env USER_ID="1234" "ansible-silo:1.3.3" "--shell" "exit" The first line shows the location of the generated runner script. The second line shows the docker command executed by the runner script. From bf61966fe452eac1d904e4b09bbdb0231c8e44f9 Mon Sep 17 00:00:00 2001 From: dschroeder Date: Thu, 20 Jul 2017 17:19:19 +0000 Subject: [PATCH 4/4] links to internal issue instead of external discussion --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e924362..771ad49 100644 --- a/README.md +++ b/README.md @@ -350,7 +350,7 @@ All files inside `foo` can be modified by you. For instance you **should** defin ### Why do I always have to enter my SSH key passphrase when Silo starts? -On OS X, forwarding of the SSH authentication socket [currently is not possible](https://github.com/docker/for-mac/issues/410). Therefore silo can not use your ssh agent, even though it is forwarded to the container. If you have a password protected SSH key, you need to enter it once after the container is started. Since silo is not persistent you have to enter it on every silo run. +On OS X, forwarding of the SSH authentication socket [currently is not possible](https://github.com/groupon/ansible-silo/issues/2). Therefore silo can not use your ssh agent, even though it is forwarded to the container. If you have a password protected SSH key, you need to enter it once after the container is started. Since silo is not persistent you have to enter it on every silo run. ## Troubleshooting