now builds in a docker container with runtime env var

This commit is contained in:
Alex Kretzschmar 2018-07-30 16:14:07 +01:00
parent 2d3e193ba2
commit 4e7d49383f
5 changed files with 33 additions and 22 deletions

1
.dockerignore Normal file
View File

@ -0,0 +1 @@
readme/

19
Dockerfile Normal file
View File

@ -0,0 +1,19 @@
FROM alpine:3.8
# set version label
ARG BUILD_DATE
ARG VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="ironicbadger"
RUN \
echo "**** install build packages ****" && \
apk add --no-cache \
ansible
COPY . /ansible
WORKDIR /ansible
VOLUME [ "/readme" ]
CMD [ "ansible-playbook", "generate.yml", "--extra-vars", "name=$NAME" ]

View File

@ -1,11 +1,7 @@
# linuxserver/config-manager
You will need Ansible installed on your system.
You will need docker. Edit the `NAME` variable to match the `container-*` file in vars.
Clone the repo, cd into it and run
docker run --rm -e NAME=airsonic -v ${PWD}/readme:/ansible/readme config-manager:latest
ansible-playbook generate-docs.yml
Then look under the `readme/project_name` directory.
Lots still to do on this but this is the general gist of what I was going for.
Then look under the `readme/project_name` directory.

View File

@ -1,15 +0,0 @@
---
- hosts: localhost
vars_files:
- vars/common
roles:
- { role: roles/generate-docs, container_name: "airsonic" }
- { role: roles/generate-docs, container_name: "beets" }
- { role: roles/generate-docs, container_name: "booksonic" }
- { role: roles/generate-docs, container_name: "calibre-web" }
- { role: roles/generate-docs, container_name: "cardigann" }
- { role: roles/generate-docs, container_name: "clarkson" }
- { role: roles/generate-docs, container_name: "codiad" }
- { role: roles/generate-docs, container_name: "plex" }
- { role: roles/generate-docs, container_name: "smokeping" }

10
generate.yml Normal file
View File

@ -0,0 +1,10 @@
---
- hosts: localhost
vars_files:
- vars/common
pre_tasks:
- set_fact:
container_name: "{{ lookup('env', 'NAME' ) | ternary (lookup('env', 'NAME' ), omit) }}"
roles:
- { role: roles/generate-docs }