diff --git a/configure-grafana.yml b/configure-grafana.yml new file mode 100644 index 0000000..13df535 --- /dev/null +++ b/configure-grafana.yml @@ -0,0 +1,17 @@ +--- +- name: Configure Grafana + hosts: localhost + tasks: + - name: Create netz39 user + community.grafana.grafana_user: + url: "https://{{ hostvars['pottwal.n39.eu']['grafana_domain_name'] }}" + url_username: admin + url_password: > + "{{ hostvars['pottwal.n39.eu']['grafana_admin_password'] }}" + name: "{{ item.name }}" + email: "{{ item.email }}" + login: "{{ item.login }}" + password: "{{ item.password }}" + is_admin: true + state: present + loop: "{{ grafana_users }}" diff --git a/host-pottwal.yml b/host-pottwal.yml index f433410..654ba2c 100644 --- a/host-pottwal.yml +++ b/host-pottwal.yml @@ -22,7 +22,7 @@ - conference.jabber.n39.eu deploy_cert_hook: "docker exec prosody prosodyctl --root cert import ${DOMAIN} /var/lib/dehydrated/certs" - name: redmine.n39.eu - - name: influx.n39.eu + - name: "{{ influxdb_domain_name }}" - name: uptime.n39.eu - name: "{{ grafana_domain_name }}" - role: penguineer.dehydrated_cron @@ -279,11 +279,11 @@ volumes: - "{{ data_dir }}/influxdb:/var/lib/influxdb2" - - name: Setup proxy site influx.n39.eu + - name: Setup proxy site {{ influxdb_domain_name }} include_role: name: setup_http_site_proxy vars: - site_name: influx.n39.eu + site_name: "{{ influxdb_domain_name }}" proxy_port: "{{ influxdb_host_port }}" # Expected setup for the data directory diff --git a/host_vars/localhost/vars.yml b/host_vars/localhost/vars.yml new file mode 100644 index 0000000..cd3c13d --- /dev/null +++ b/host_vars/localhost/vars.yml @@ -0,0 +1,5 @@ +grafana_users: + - name: Netz39 + email: accounts+grafana@netz39.de + login: netz39 + password: "{{ vault_grafana_user_password }}" diff --git a/host_vars/localhost/vault b/host_vars/localhost/vault new file mode 100644 index 0000000..540574d --- /dev/null +++ b/host_vars/localhost/vault @@ -0,0 +1,7 @@ +$ANSIBLE_VAULT;1.1;AES256 +66303836663730383331396265363534666661326163643634306332613038653530333333326236 +3163343062656262363364373561646163623666623738620a373039353861306261643435346330 +64333139336536346130646435393235643838356634636233363035306437353230333864346437 +6562366564373461380a393265656437303531396234613266383334373762646536643733323565 +61366261303965316263303434313462656661666530636662306633663336316462303339633531 +3832643731646535306562326162363864646338343165633834 diff --git a/host_vars/pottwal.n39.eu/vars.yml b/host_vars/pottwal.n39.eu/vars.yml index 35a5522..1139a67 100644 --- a/host_vars/pottwal.n39.eu/vars.yml +++ b/host_vars/pottwal.n39.eu/vars.yml @@ -23,6 +23,7 @@ redmine_database: redmine redmine_database_password: "{{ vault_redmine_database_password }}" influxdb_host_port: 8088 +influxdb_domain_name: influx.n39.eu influxdb_image: influxdb:2.4-alpine influxdb_init_username: admin influxdb_init_password: "{{ vault_influxdb_init_password }}" diff --git a/requirements.yml b/requirements.yml index cc463d4..a733ef5 100644 --- a/requirements.yml +++ b/requirements.yml @@ -1,11 +1,16 @@ --- -- src: hifis.unattended_upgrades - version: v1.12.2 -- src: git+https://github.com/adriagalin/ansible.timezone.git - version: 3.0.0 -- src: git+https://github.com/24367dfa/ansible-role-dehydrated.git - version: 1.0.3 -- src: penguineer.dehydrated_cron - version: v1.0.0 -- src: git+https://github.com/maz3max/ble-keykeeper-role.git - version: v1.1.0 +roles: + - src: hifis.unattended_upgrades + version: v1.12.2 + - src: git+https://github.com/adriagalin/ansible.timezone.git + version: 3.0.0 + - src: git+https://github.com/24367dfa/ansible-role-dehydrated.git + version: 1.0.3 + - src: penguineer.dehydrated_cron + version: v1.0.0 + - src: git+https://github.com/maz3max/ble-keykeeper-role.git + version: v1.1.0 + +collections: + - name: community.grafana + version: 1.5.3