|
101 | 101 | tasks_from: install.yml |
102 | 102 | when: "'filebeat' in group_names" |
103 | 103 |
|
104 | | - - import_role: |
105 | | - # can't only run cloudalchemy.node_exporter/tasks/install.yml as needs vars from preflight.yml and triggers service start |
106 | | - # however starting node exporter is ok |
107 | | - name: cloudalchemy.node_exporter |
108 | | - when: "'node_exporter' in group_names" |
109 | | - |
110 | 104 | - name: openondemand exporter |
111 | 105 | dnf: |
112 | 106 | name: ondemand_exporter |
|
120 | 114 | slurm_exporter_state: stopped |
121 | 115 | when: "'slurm_exporter' in group_names" |
122 | 116 |
|
123 | | -- hosts: prometheus |
124 | | - become: yes |
125 | | - gather_facts: yes |
126 | | - tasks: |
127 | | - - import_role: |
128 | | - name: cloudalchemy.prometheus |
129 | | - tasks_from: preflight.yml |
130 | | - |
131 | | - # can't run cloudalchemy.prometheus/tasks/install.yml as it triggers a unit start |
132 | | - # so below is a partial extraction of this: |
133 | | - - name: create prometheus system group |
134 | | - group: |
135 | | - name: prometheus |
136 | | - system: true |
137 | | - state: present |
138 | | - |
139 | | - - name: create prometheus system user |
140 | | - user: |
141 | | - name: prometheus |
142 | | - system: true |
143 | | - shell: "/usr/sbin/nologin" |
144 | | - group: prometheus |
145 | | - createhome: false |
146 | | - home: "{{ prometheus_db_dir }}" |
147 | | - |
148 | | - - name: download prometheus binary to local folder |
149 | | - become: false |
150 | | - get_url: |
151 | | - url: "https://github.com/prometheus/prometheus/releases/download/v{{ prometheus_version }}/prometheus-{{ prometheus_version }}.linux-{{ go_arch }}.tar.gz" |
152 | | - dest: "/tmp/prometheus-{{ prometheus_version }}.linux-{{ go_arch }}.tar.gz" |
153 | | - checksum: "sha256:{{ __prometheus_checksum }}" |
154 | | - register: _download_archive |
155 | | - until: _download_archive is succeeded |
156 | | - retries: 5 |
157 | | - delay: 2 |
158 | | - |
159 | | - - name: unpack prometheus binaries |
160 | | - become: false |
161 | | - unarchive: |
162 | | - remote_src: yes |
163 | | - src: "/tmp/prometheus-{{ prometheus_version }}.linux-{{ go_arch }}.tar.gz" |
164 | | - dest: "/tmp" |
165 | | - creates: "/tmp/prometheus-{{ prometheus_version }}.linux-{{ go_arch }}/prometheus" |
166 | | - |
167 | | - - name: propagate official prometheus and promtool binaries |
168 | | - copy: |
169 | | - remote_src: yes |
170 | | - src: "/tmp/prometheus-{{ prometheus_version }}.linux-{{ go_arch }}/{{ item }}" |
171 | | - dest: "{{ _prometheus_binary_install_dir }}/{{ item }}" |
172 | | - mode: 0755 |
173 | | - owner: root |
174 | | - group: root |
175 | | - with_items: |
176 | | - - prometheus |
177 | | - - promtool |
178 | | - |
179 | | -- hosts: grafana |
180 | | - become: yes |
181 | | - gather_facts: yes |
182 | | - tasks: |
183 | | - - name: Include distribution variables for cloudalchemy.grafana |
184 | | - include_vars: "{{ appliances_repository_root }}/ansible/roles/cloudalchemy.grafana/vars/redhat.yml" |
185 | | - - import_role: |
186 | | - name: cloudalchemy.grafana |
187 | | - tasks_from: install.yml |
188 | | - |
189 | 117 | - name: Run post.yml hook |
190 | 118 | vars: |
191 | 119 | appliances_environment_root: "{{ lookup('env', 'APPLIANCES_ENVIRONMENT_ROOT') }}" |
|
0 commit comments