diff --git a/README.rst b/README.rst index 1f0625f61be7f546b0de3ba5b971e3f1f04440ed..51b4f4c55a24e75e7870296b894fdca7daa19150 100644 --- a/README.rst +++ b/README.rst @@ -1,4 +1,38 @@ Run ansible playbooks ===================== -This docker image can be used to run ansible playbooks with gitlab-ci. +This docker image can be used to run ansible playbooks interactively or with +gitlab-ci. + +Update cycle +------------ + +The image gets updated every sunday in the early morning and is available by +the image name `jugit-registry.fz-juelich.de/docker-images/gitlabci-ansible`. + +Interactive usage +----------------- + +The image can also be used to run interactively. + +.. code-block:: bash + + $ docker run --rm -v $(pwd):/data -w /data jugit-registry.fz-juelich.de/docker-images/gitlabci-ansible ansible-playbook playbook.yml + +will run `playbook.yml` in the current working directory. For simplification +this command can be added as a function to the resource file of the used shell: + +.. code-block:: bash + + docker-ansible() { + docker run --rm -v $(pwd):/data -w /data jugit-registry.fz-juelich.de/docker-images/gitlabci-ansible $@ + } + +With that the following usage is possible: + +.. code-block:: bash + + $ docker-ansible ansible-playbook playbook.yml + +Aliases are of no use because `$(pwd)` gets evaluated at shell startup and will +be the same for the complete life cycle of the shell.