File tree Expand file tree Collapse file tree 8 files changed +21
-84
lines changed
Expand file tree Collapse file tree 8 files changed +21
-84
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ log_vol=${log_vol}
6060ldap=${ ldap}
6161queue=${ queue}
6262instance_type=${ instance_type}
63+ monitoring=${ monitoring}
6364hyperthreading=${ hyperthreading}
6465privilege_sudo=${ privilege_sudo}
6566privilege_group_name=${ privilege_group_name}
Original file line number Diff line number Diff line change @@ -116,6 +116,7 @@ variable "hyperthreading" { default = ##HT## }
116116variable "unsupported" { default = ${unsupported} }
117117variable "image_ocid" { default = " ##IMAGE##" }
118118variable "ldap" { default = ${ldap} }
119+ variable "monitoring" { default = ${monitoring} }
119120variable "autoscaling_monitoring" { default = ${autoscaling_monitoring} }
120121
121122
Original file line number Diff line number Diff line change 203203 - include_role :
204204 name : slurm
205205 when : slurm|default(false)|bool
206+ - include_role :
207+ name : influxdb
208+ when : monitoring|default(false)|bool
206209 - include_role :
207210 name : telegraf
208211 when : monitoring|default(false)|bool
Original file line number Diff line number Diff line change 205205 - include_role :
206206 name : slurm
207207 when : slurm|default(false)|bool
208+ - include_role :
209+ name : influxdb
210+ when : monitoring|default(false)|bool
208211 - include_role :
209212 name : telegraf
210213 when : monitoring|default(false)|bool
Original file line number Diff line number Diff line change 5151 sslcacert : /etc/pki/tls/certs/ca-bundle.crt
5252
5353- name : install grafana
54- vars :
55- package_name :
56- - grafana-8.5.21-1
57- package_state : present
5854 include_role :
59- name : safe_yum
60-
61- - name : start grafana
62- become : true
63- service :
64- name : grafana-server
65- state : restarted
66- enabled : true
67-
68- - name : Ensure grafana key directory exists
69- file :
70- path : " /etc/opt/oci-hpc/passwords/grafana"
71- state : directory
72- delegate_to : localhost
73-
74- - name : Check api key list
75- uri :
76- url : " {{ grafana_api_url }}/api/auth/keys"
77- user : " {{ grafana_security.admin_user }}"
78- password : " {{ grafana_security.admin_password }}"
79- force_basic_auth : true
80- return_content : true
81- no_log : false
82- register : existing_api_keys
55+ name : grafana
56+ when : not monitoring|default(false)|bool
8357
8458- name : install mysql-shell and connector
8559 vars :
Original file line number Diff line number Diff line change 5050# sslverify: 1
5151# sslcacert: /etc/pki/tls/certs/ca-bundle.crt
5252
53- - name : Add grafana key
54- become : true
55- apt_key :
56- state : present
57- url : https://packages.grafana.com/gpg.key
58-
59- - name : Manage grafana APT repositories
60- become : true
61- apt_repository :
62- repo : deb https://packages.grafana.com/oss/deb stable main
63- state : present
64-
6553- name : install grafana
66- vars :
67- package_name :
68- - grafana-8.5.21-1
69- package_state : present
7054 include_role :
71- name : safe_yum
72-
73- - name : start grafana
74- become : true
75- service :
76- name : grafana-server
77- state : restarted
78- enabled : true
79-
80- - name : Ensure grafana key directory exists
81- file :
82- path : " /etc/opt/oci-hpc/passwords/grafana"
83- state : directory
84- delegate_to : localhost
85-
86- - name : Check api key list
87- uri :
88- url : " {{ grafana_api_url }}/api/auth/keys"
89- method : GET
90- user : " {{ grafana_security.admin_user }}"
91- password : " {{ grafana_security.admin_password }}"
92- force_basic_auth : true
93- return_content : true
94- no_log : false
95- register : existing_api_keys
96- retries : 5
97- delay : 5
98- until : existing_api_keys is not failed
55+ name : grafana
56+ when : not monitoring|default(false)|bool
9957
10058# - name: Import mysql-2022 key
10159# become: true
Original file line number Diff line number Diff line change 1515- name : install grafana
1616 vars :
1717 package_name :
18- - grafana-8.5.21-1
18+ - https://dl. grafana.com/oss/release/grafana -8.5.21-1.x86_64.rpm
1919 package_state : present
2020 include_role :
2121 name : safe_yum
Original file line number Diff line number Diff line change 1818 state : present
1919 url : https://packages.grafana.com/gpg.key
2020
21- - name : Manage grafana APT repositories
21+ - name : Download grafana 8.5.21 package
22+ get_url :
23+ url : https://dl.grafana.com/oss/release/grafana_8.5.21_amd64.deb
24+ dest : /tmp/grafana_8.5.21_amd64.deb
25+
26+ - name : Install grafana 8.5.21 package
2227 become : true
23- apt_repository :
24- repo : deb https://packages.grafana.com/oss/ deb stable main
28+ ansible.builtin.apt :
29+ deb : /tmp/grafana_8.5.21_amd64. deb
2530 state : present
2631
27- - name : install grafana
28- vars :
29- package_name :
30- - grafana-8.5.21-1
31- package_state : present
32- include_role :
33- name : safe_yum
34-
3532- name : start grafana
3633 become : true
3734 service :
You can’t perform that action at this time.
0 commit comments