system-config/playbooks/roles/jaeger/tasks/main.yaml
James E. Blair 8492420407 Correct internal tracing server cert name
We have instructed zuul to connect to tracing.opendev.org, but
we are generating a certificate using opendev-ca with
S=tracing01.opendev.org.  Update the certificate with the correct
subject.

This also corrects the opendev-ca role which assumed that the cert
filename would always be inventory_hostname.

Change-Id: I9b6b0534f058d386e01910bb7efc30312f3d72ad
2022-09-28 10:38:41 -07:00

90 lines
1.8 KiB
YAML

- name: Create jaeger group
group:
name: "{{ jaeger_group }}"
gid: "{{ jaeger_gid }}"
system: yes
- name: Create jaeger user
user:
name: "{{ jaeger_user }}"
group: "{{ jaeger_group }}"
uid: "{{ jaeger_uid }}"
home: "/home/{{ jaeger_user }}"
create_home: yes
shell: /bin/bash
system: yes
- name: Ensure docker-compose directory exists
file:
state: directory
path: /etc/jaeger-docker
- name: Write docker-compose file
template:
src: docker-compose.yaml.j2
dest: /etc/jaeger-docker/docker-compose.yaml
- name: Ensure data directory exists
file:
state: directory
path: /var/jaeger/badger
owner: "{{ jaeger_user }}"
group: "{{ jaeger_group }}"
mode: "0750"
- name: Generate GRPC TLS cert
include_role:
name: opendev-ca
vars:
opendev_ca_name: jaeger
opendev_ca_server: "tracing.opendev.org"
opendev_ca_cert_dir: /var/jaeger/tls
opendev_ca_cert_dir_owner: "{{ jaeger_user }}"
opendev_ca_cert_dir_group: "{{ jaeger_group }}"
- name: Install apache2
apt:
name:
- apache2
- apache2-utils
state: present
- name: Apache modules
apache2_module:
state: present
name: "{{ item }}"
loop:
- rewrite
- proxy
- proxy_http
- ssl
- headers
- name: Copy apache config
template:
src: tracing.vhost.j2
dest: /etc/apache2/sites-enabled/000-default.conf
owner: root
group: root
mode: 0644
notify: jaeger Reload apache2
- name: Run docker-compose pull
shell:
cmd: docker-compose pull
chdir: /etc/jaeger-docker/
- name: Run docker-compose up
shell:
cmd: docker-compose up -d
chdir: /etc/jaeger-docker/
- name: Wait for jaeger to start
wait_for:
port: 16686
timeout: 60
- name: Run docker prune to cleanup unneeded images
shell:
cmd: docker image prune -f