- `williamyeh/ansible:centos6`
- `williamyeh/ansible:alpine3`
-- Onbuild series:
+- Onbuild series (*recommended for common cases*):
- `williamyeh/ansible:debian8-onbuild`
- `williamyeh/ansible:debian7-onbuild`
# ==> Specify inventory filename; default = "/etc/ansible/hosts"
#ENV INVENTORY inventory.ini
-# ==> Executing Ansible...
+# ==> Executing Ansible (with a simple wrapper)...
RUN ansible-playbook-wrapper
```
--connection=local --sudo
```
-Or, more simple with `onbuild` series:
+You may also work with `onbuild` series, which take care of many routine steps for you:
```dockerfile
# Dockerfile
# ==> Specify inventory filename; default = "/etc/ansible/hosts"
#ENV INVENTORY inventory.ini
-# ==> Executing Ansible...
+# ==> Executing Ansible (with a simple wrapper)...
RUN ansible-playbook-wrapper
```
pip install ansible && \
\
\
- echo "===> Removing unused APT resources..." && \
- apt-get -f -y --auto-remove remove curl gcc python-pip python-dev && \
- apt-get clean && \
- rm -rf /var/lib/apt/lists/* /tmp/* && \
+ echo "===> Removing unused APT resources..." && \
+ apt-get -f -y --auto-remove remove gcc python-pip python-dev && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists/* /tmp/* && \
\
\
echo "===> Adding hosts for convenience..." && \
pip install ansible && \
\
\
- echo "===> Removing unused APT resources..." && \
- apt-get -f -y --auto-remove remove curl gcc python-pip python-dev && \
- apt-get clean && \
- rm -rf /var/lib/apt/lists/* /tmp/* && \
+ echo "===> Removing unused APT resources..." && \
+ apt-get -f -y --auto-remove remove gcc python-pip python-dev && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists/* /tmp/* && \
\
\
echo "===> Adding hosts for convenience..." && \
pip install ansible && \
\
\
- echo "===> Removing unused APT resources..." && \
- apt-get -f -y --auto-remove remove curl gcc python-pip python-dev && \
- apt-get clean && \
- rm -rf /var/lib/apt/lists/* /tmp/* && \
+ echo "===> Removing unused APT resources..." && \
+ apt-get -f -y --auto-remove remove gcc python-pip python-dev && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists/* /tmp/* && \
\
\
echo "===> Adding hosts for convenience..." && \
pip install ansible && \
\
\
- echo "===> Removing unused APT resources..." && \
- apt-get -f -y --auto-remove remove curl gcc python-pip python-dev && \
- apt-get clean && \
- rm -rf /var/lib/apt/lists/* /tmp/* && \
+ echo "===> Removing unused APT resources..." && \
+ apt-get -f -y --auto-remove remove gcc python-pip python-dev && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists/* /tmp/* && \
\
\
echo "===> Adding hosts for convenience..." && \