fix variables checking and add instructions for setting variables

This commit is contained in:
panda 2020-03-14 11:28:22 +01:00
parent 523fd3e2ed
commit a4f6ca0be1
3 changed files with 32 additions and 3 deletions

View file

@ -10,12 +10,17 @@ add hosts lines to ansible:
SETUP:
you have to change at least 2 variables:
- users
- hostname
which by default are set to "CHANGEME" anche the playbook is set to fail if these are set to CHANGEME
insert your user in:
variables.yml
in the list:
users:
goofy
and their ssh keys in the folder
keys
in form of filename:
@ -23,6 +28,10 @@ in form of filename:
and format:
ssh-rsa [/CUT] user@host
insert your hostname in
variables.yml
in the variable:
hostname:
RUN DEFAULTS:
@ -34,7 +43,20 @@ RUN OPTIONALS:
- telegraf.yml
- tincvpn.yml
- transmission.yml
- singularity.yml : installs go and builds and installs singularity
VERSIONS:
docker-compose:
variable: compose_ver
look here: https://github.com/docker/compose/releases/latest
go:
variable: singularity_go_ver
look here: https://golang.org/dl/ , the package is like go1.14.linux-amd64.tar.gz and you take the "1.14"
singularity:
varaible: singularity_ver
look here: https://github.com/sylabs/singularity/releases/latest
GIT PUSH:
git add --all

View file

@ -7,6 +7,12 @@
- variables.yml
tasks:
- fail: msg="The user in the list 'users' in variables.yml, has to be set to somethings else than CHANGEME"
when: '"CHANGEME" in users'
- fail: msg="The variable 'hostname' in variables.yml, has to be set to somethings else than CHANGEME"
when: '"CHANGEME" in hostname'
- name: change hostname to myserver
hostname:
name: "{{ hostname }}"

View file

@ -1,7 +1,8 @@
users:
- commonuser
- CHANGEME
hostname: CHANGEME
#
tinc_vpn: vpn
hostname: common_hostname
compose_ver: 1.25.4
singularity_go_ver: 1.13.6
singularity_ver: 3.5.2