Skip to content

Commit

Permalink
Reorganise variables
Browse files Browse the repository at this point in the history
  • Loading branch information
drmatthews committed Dec 20, 2023
1 parent 983510d commit 90112e5
Showing 1 changed file with 19 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,26 @@
monitoring_server_certificate_cache_directory: "{{ lookup('env', 'HOME') }}/ansible_persistent_files/monitoring_server_certificates"
monitoring_client_certificate_cache_directory: "{{ monitoring_server_certificate_cache_directory }}"
# mirsg.infrastructure.monitoring_client
monitoring_client_certificate_cache_directory: "{{ lookup('env', 'HOME') }}/ansible_persistent_files/monitoring_server_certificates"
monitoring_client_monitoring_server_ip: "{{ hostvars['mserv']['ansible_ip'] }}"
monitoring_client_owner: root
monitoring_client_group: root
monitoring_client_cert_dir: /root/monitoring_certs
monitoring_client_ssl_key_file: /root/monitoring_certs/key.pem
monitoring_client_ssl_csr_file: /root/monitoring_certs/monitoring.csr
monitoring_client_ssl_pk8_file: /root/monitoring_certs/monitoring.pk8
monitoring_client_ssl_cert_file: /root/monitoring_certs/cert.pem
monitoring_client_server_ca_cert_file: /root/monitoring_certs/ca.pem
monitoring_client_exporter_username: prometheus
monitoring_client_exporter_password: prometheus
monitoring_client_certificate_file: "{{ hostvars['mclient']['hostname'] }}.cert"

# mirsg.infrastructure.monitoring_server
monitoring_server_certificate_cache_directory: "{{ monitoring_client_certificate_cache_directory }}"
monitoring_server_ssl_cert: "/etc/ssl/certs/{{ hostvars['mserv']['hostname'] }}.cert"
monitoring_server_ssl_key: "/etc/ssl/certs/{{ hostvars['mserv']['hostname'] }}.key"
monitoring_server_client_hostnames:
- "{{ hostvars['centos7_mclient']['hostname'] }}"
- "{{ hostvars['mclient']['hostname'] }}"

# mirsg.infrastructure.docker
docker_client_certificate_cache_directory: "{{ monitoring_server_certificate_cache_directory }}"
docker_server_hostname: "{{ hostvars['mserv']['hostname'] }}"
docker_server_ip: "{{ hostvars['mserv']['ansible_ip'] }}"
Expand All @@ -14,15 +30,4 @@ docker_generate_certificates: true # generate TLS certs for clients
docker_client_hostnames: "{{ monitoring_server_client_hostnames }}"
docker_tls_verify: true

monitoring_client_owner: root
monitoring_client_group: root
monitoring_client_cert_dir: /root/monitoring_certs
monitoring_client_ssl_key_file: /root/monitoring_certs/key.pem
monitoring_client_ssl_csr_file: /root/monitoring_certs/monitoring.csr
monitoring_client_ssl_pk8_file: /root/monitoring_certs/monitoring.pk8
monitoring_client_ssl_cert_file: /root/monitoring_certs/cert.pem
monitoring_client_server_ca_cert_file: /root/monitoring_certs/ca.pem
monitoring_client_exporter_username: prometheus
monitoring_client_exporter_password: prometheus

monitoring_client_certificate_file: "{{ hostvars['mclient']['hostname'] }}.cert"

0 comments on commit 90112e5

Please sign in to comment.