Add some additional ansible tweaks to docker container for piframefleet

This commit is contained in:
KemoNine 2020-08-04 06:39:09 +00:00
parent 20c05b55a8
commit ddd4c6df8c
5 changed files with 17 additions and 3 deletions

View file

@ -3,4 +3,4 @@
# https://www.tauceti.blog/post/kubernetes-the-not-so-hard-way-with-ansible-wireguard/
# https://github.com/githubixx/ansible-role-wireguard
ansible-playbook -i inventory-wireguard --skip-tags wg-install ./playbook-deploy-controller.yml
ansible-playbook -i inventory-wireguard --skip-tags wg-install,bare-metal ./playbook-deploy-controller.yml

View file

@ -1,4 +1,4 @@
---
- hosts: controller
roles:
- githubixx.ansible_role_wireguard
- wireguard

View file

@ -42,7 +42,6 @@ RUN apt update && apt upgrade -y && \
curl -fsSL https://filebrowser.org/get.sh | bash && \
echo "**** ansible ****" && \
apt install -y python3-apt ansible ansible-lint ansible-doc && \
ansible-galaxy install githubixx.ansible_role_wireguard && \
echo "**** cleanup ****" && \
rm /opt/arch_detect.sh
rm /opt/s6-overlay.tar.gz && \
@ -54,6 +53,9 @@ RUN apt update && apt upgrade -y && \
# Copy the s6 related 'stuff' to the container
ADD /piframefleet/root/ /
# Ansible related 'stuff'
VOLUME /opt/ansible
# Wireguard related 'stuff'
ENV ENABLE_WIREGUARD=false
EXPOSE 51820/udp

View file

@ -7,6 +7,17 @@ if [ ! -d "/opt/pictures" ] ; then
mkdir /opt/pictures
fi
####################
# Ansible
####################
if [ ! -d "/opt/ansible" ] ; then
mkdir /opt/ansible
fi
if [ ! -d "/opt/ansible/roles" ] ; then
mkdir /opt/ansible/roles
fi
git clone https://git.kemonine.info/kemonine/ansible-role-wireguard.git /opt/ansible/roles/wireguard
####################
# WireGuard
####################

View file

@ -23,5 +23,6 @@ sudo docker run -it \
-v /lib/modules:/lib/modules:ro \
-v /var/piframefleet/syncthing:/opt/syncthing \
-v /var/piframefleet/filebrowser:/opt/filebrowser \
-v /var/piframefleet/ansible:/opt/ansible \
-v /var/piframefleet/pictures:/opt/pictures \
piframe/piframefleet:latest