diff --git a/inventory.yml b/inventory.yml index 17c0ed2..bfd5b25 100644 --- a/inventory.yml +++ b/inventory.yml @@ -102,6 +102,14 @@ all: 32366339366433626466306634383563343633343736393735336130363462346265646431393839 3566326231663663340a383731353935366234643132386438663736313938356266613432303232 3165 + influxdb_init_username: admin + influxdb_init_password: !vault | + $ANSIBLE_VAULT;1.1;AES256 + 30316166356665623137386637353262316230616462356365333734323464363438666461323262 + 6463643839386563313765323534386365396131323462650a313737643139656638373265623433 + 37663136346132623166336139303234323433616634336332663133653532643336303362303161 + 3231306434626336370a363265643462366231326263313563306366393930633765633934386362 + 34316566643132353936636661623365663331333636636462316366623366383864 unicorn.n39.eu: server_admin: "admin+unicorn@netz39.de" platon.n39.eu: diff --git a/pottwal.yml b/pottwal.yml index 375725c..35f5c66 100644 --- a/pottwal.yml +++ b/pottwal.yml @@ -24,6 +24,9 @@ redmine_mysql_image: mysql:5.7 redmine_database: redmine + influxdb_host_port: 8088 + influxdb_image: influxdb:2.4-alpine + roles: - role: docker_setup vars: @@ -258,6 +261,37 @@ site_name: pad.n39.eu proxy_port: "{{ hedgedoc_host_port }}" + - name: Ensure the influxdb directories exist + file: + path: "{{ item }}" + state: directory + with_items: + - "{{ data_dir }}/influxdb" + + - name: Ensure container for influxdb is running + docker_container: + name: influxdb + image: "{{ influxdb_image }}" + pull: true + state: started + detach: yes + ports: + - "127.0.0.1:{{ influxdb_host_port }}:8086" + restart_policy: unless-stopped + env: + DOCKER_INFLUXDB_INIT_USERNAME: "{{ influxdb_init_username }}" + DOCKER_INFLUXDB_INIT_PASSWORD: "{{ influxdb_init_password }}" + DOCKER_INFLUXDB_INIT_ORG: Netz39 + DOCKER_INFLUXDB_INIT_BUCKET: default + volumes: + - "{{ data_dir }}/influxdb:/var/lib/influxdb2" + + - name: Setup proxy site influx.n39.eu + include_role: + name: setup-http-site-proxy + vars: + site_name: influx.n39.eu + proxy_port: "{{ influxdb_host_port }}" # Expected setup for the data directory # file: configuration.yml