Skip to content

Commit

Permalink
#56: adds ansible-inventory command (#61)
Browse files Browse the repository at this point in the history
* #56: adds ansible-inventory command

* prepare release v2.2.0
  • Loading branch information
udondan authored Jun 8, 2018
1 parent 4685ef2 commit 178b85e
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 14 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1.2
2.2.0
4 changes: 2 additions & 2 deletions docs/demo-source/demo
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ pec "ansible --version || ansible-silo --version"

info "Let's install Ansible Silo:"
p "docker run --interactive --tty --rm --volume\
\"\$HOME/bin:/silo_install_path\" grpn/ansible-silo:2.1.2 --install"
\"\$HOME/bin:/silo_install_path\" grpn/ansible-silo:2.2.0 --install"
docker run --interactive --tty --rm --volume "$HOME/bin:/silo_install_path" \
grpn/ansible-silo:2.1.2 --install
grpn/ansible-silo:2.2.0 --install

info "Now Ansible is installed in \$HOME/bin:"
pec "which ansible"
Expand Down
2 changes: 1 addition & 1 deletion docs/demo-source/run
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ fi
ansible-silo --reset
docker kill example.com && docker rm example.com
docker rmi -f alpine:3.6 \
grpn/ansible-silo:2.1.2 \
grpn/ansible-silo:2.2.0 \
grpn/ansible-silo:latest \
grpn/ansible-silo-base:2.0.1 \
grpn/ansible-silo-base:latest \
Expand Down
28 changes: 19 additions & 9 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ asciinema: true
---

[![GitHub release](https://img.shields.io/github/tag/groupon/ansible-silo.svg?style=flat&colorB=4183C4&label=Latest%20release)](https://github.com/groupon/ansible-silo/releases/latest)
[![Commits since v2.1.2](https://img.shields.io/github/commits-since/groupon/ansible-silo/v2.1.2.svg?style=flat&colorB=4183C4&label=Commits%20since%20v2.1.2)](https://github.com/groupon/ansible-silo/commits/master)
[![Commits since v2.2.0](https://img.shields.io/github/commits-since/groupon/ansible-silo/v2.2.0.svg?style=flat&colorB=4183C4&label=Commits%20since%20v2.2.0)](https://github.com/groupon/ansible-silo/commits/master)
[![GitHub Stars](https://img.shields.io/github/stars/groupon/ansible-silo.svg?style=flat&colorB=4183C4&label=GitHub%20Stars)](https://github.com/groupon/ansible-silo/stargazers)
[![Build Status](https://img.shields.io/travis/groupon/ansible-silo.svg?style=flat&label=Tests)](https://travis-ci.org/groupon/ansible-silo)
[![Docker Build Status](https://img.shields.io/docker/build/grpn/ansible-silo.svg?style=flat&label=Build)](https://hub.docker.com/r/grpn/ansible-silo/builds/)
Expand Down Expand Up @@ -135,15 +135,15 @@ You need to be on a system where you have installed Docker (minimum version 1.9)
To install the `ansible-silo` executable along with Ansible replacements run:

```bash
docker run --interactive --tty --rm --volume "$HOME/bin:/silo_install_path" grpn/ansible-silo:2.1.2 --install
docker run --interactive --tty --rm --volume "$HOME/bin:/silo_install_path" grpn/ansible-silo:2.2.0 --install
```

This command mounts your `~/bin` directory so Silo can place its executables there. Select any location you like but make sure it is in your `$PATH`.

To install `ansibe-silo` for all users you can mount `/usr/local/bin`:

```bash
docker run --interactive --tty --rm --volume "/usr/local/bin:/silo_install_path" grpn/ansible-silo:2.1.2 --install
docker run --interactive --tty --rm --volume "/usr/local/bin:/silo_install_path" grpn/ansible-silo:2.2.0 --install
```

### Uninstall ansible-silo
Expand Down Expand Up @@ -283,9 +283,9 @@ Which will show something along these lines:

Runner file already exists.

Executing: /tmp/ansible-silo-runner-2.1.2 "--shell" "exit"
Executing: /tmp/ansible-silo-runner-2.2.0 "--shell" "exit"

Executing: /usr/bin/docker run --interactive --tty --rm --volume "/home/daniel.schroeder/ansible-silo:/home/user/playbooks" --volume "silo.some.user:/silo/userspace" --env "SILO_VOLUME=silo.some.user" --hostname "silo.example.com" --volume /var/run/docker.sock:/var/run/docker.sock --privileged --volume "/home/some.user/.ssh:/home/user/._ssh" --volume "/tmp/ssh-6k3r1bCpCi":"/tmp/ssh-6k3r1bCpCi" --env SSH_AUTH_SOCK --env USER_NAME="some.user" --env USER_ID="1234" "grpn/ansible-silo:2.1.2" "--shell" "exit"
Executing: /usr/bin/docker run --interactive --tty --rm --volume "/home/daniel.schroeder/ansible-silo:/home/user/playbooks" --volume "silo.some.user:/silo/userspace" --env "SILO_VOLUME=silo.some.user" --hostname "silo.example.com" --volume /var/run/docker.sock:/var/run/docker.sock --privileged --volume "/home/some.user/.ssh:/home/user/._ssh" --volume "/tmp/ssh-6k3r1bCpCi":"/tmp/ssh-6k3r1bCpCi" --env SSH_AUTH_SOCK --env USER_NAME="some.user" --env USER_ID="1234" "grpn/ansible-silo:2.2.0" "--shell" "exit"

The first _Executing_ line shows the location of the generated runner script. The last line shows the Docker command executed by the runner script.

Expand Down Expand Up @@ -324,7 +324,7 @@ Specifies the name of the used Silo volume. This defaults to the name of the cur

```bash
$ ansible-silo --version
ansible-silo 2.1.2
ansible-silo 2.2.0
ansible 2.4.2.0
ansible-lint 3.4.20
ansible installed on volume silo.some.user
Expand Down Expand Up @@ -366,7 +366,7 @@ You can log into the running Silo container by calling Silo with the `--shell` o

```bash
$ ansible-silo --shell
[ansible-silo 2.1.2|~/playbooks]$
[ansible-silo 2.2.0|~/playbooks]$
```

All arguments after the `--shell` option will be directly executed.
Expand Down Expand Up @@ -395,13 +395,13 @@ $ SILO_VOLUME="1.9.6" ansible-silo --switch v1.9.6-1
Switched to Ansible 1.9.6

$ ansible-silo --version
ansible-silo 2.1.2
ansible-silo 2.2.0
ansible 2.4.2.0
ansible-lint 3.4.20
ansible installed on volume silo.1.9.6

$ SILO_VOLUME="1.9.6" ansible-silo --version
ansible-silo 2.1.2
ansible-silo 2.2.0
ansible 1.9.6
ansible-lint 3.4.20
ansible installed on volume silo.1.9.6
Expand Down Expand Up @@ -501,6 +501,16 @@ Ansible Silo uses [SemVer]. Since Ansible Silo is the promise of a stable enviro

## Version history

### v2.2.0 (Jun 8, 2018)

* Adds support for non-tty environments.
* Adds `ansible-inventory` command.
* Adds support for ssh socket forwarded via [uber/ssh-agent-forward](https://hub.docker.com/r/uber/ssh-agent-forward/) (pinata).

### v2.1.1 (Jan 15, 2018)

* Fixes name of example function in bundle extension.

### v2.1.0 (Jan 9, 2018)

* Adds support for bundle extensions.
Expand Down
1 change: 1 addition & 0 deletions silo/bin/ansible-inventory
3 changes: 3 additions & 0 deletions silo/help.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ Commands:
ansible-console Calls ansible-console
ansible-doc Calls ansible-doc
ansible-galaxy Calls ansible-galaxy
ansible-inventory Calls ansible-inventory
ansible-lint Calls ansible-lint
ansible-playbook Calls ansible-playbook
ansible-pull Calls ansible-pull
ansible-vault Calls ansible-vault

ansible-config
2 changes: 1 addition & 1 deletion tests/functional
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ test_silo_bundle_function() {
@test "ansible is pointing to ansible-silo" {

# 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
for tool in "ansible" "ansible-config" "ansible-console" "ansible-doc" "ansible-galaxy" "ansible-inventory" "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
Expand Down

0 comments on commit 178b85e

Please sign in to comment.