File tree Expand file tree Collapse file tree 2 files changed +43
-0
lines changed
Expand file tree Collapse file tree 2 files changed +43
-0
lines changed Original file line number Diff line number Diff line change 6767 state : mounted
6868 fstype : " {{ data_volume.get('fs_type', 'ext4') }}"
6969 opts : " {{ data_volume.get('opts', omit) }}"
70+
71+ # Workaround for https://github.com/azimuth-cloud/azimuth-images/issues/370
72+ - name : Ensure permissions for mount
73+ ansible.builtin.file :
74+ path : " {{ item }}"
75+ state : directory
76+ owner : root
77+ group : root
78+ mode : " 0755"
79+ loop :
80+ - " {{ data_volume.mountpoint }}"
81+ - " {{ data_volume.mountpoint }}/lost+found"
82+ # Avoid making changes Zenith data volume
83+ when : data_volume.mountpoint == "/data"
Original file line number Diff line number Diff line change 2323 regexp : " {{ ansible_hostname }}"
2424 line : " {{ ansible_default_ipv4.address }} {{ ansible_hostname }}"
2525
26+ # Workaround for https://github.com/azimuth-cloud/azimuth-images/issues/370
27+ - name : Ensure Prometheus parent directory with correct permissions
28+ ansible.builtin.file :
29+ path : /data/prometheus
30+ state : directory
31+ owner : " {{ prometheus_podman_user }}"
32+ group : " {{ prometheus_podman_user }}"
33+ recurse : true
34+ mode : " 0755"
35+
2636 - name : Ensure Prometheus data directory exists
2737 ansible.builtin.file :
2838 path : " {{ prometheus_data }}"
3141 group : " {{ prometheus_podman_user }}"
3242 mode : " 0755"
3343
44+ # Workaround for https://github.com/azimuth-cloud/azimuth-images/issues/370
45+ - name : Check for existing Prometheus data files
46+ ansible.builtin.stat :
47+ path : " {{ prometheus_data }}/{{ item }}"
48+ loop :
49+ - lock
50+ - queries.active
51+ register : _prom_files
52+
53+ - name : Ensure permissions on Prometheus data files
54+ ansible.builtin.file :
55+ path : " {{ item.stat.path }}"
56+ state : file
57+ owner : " {{ prometheus_podman_user }}"
58+ group : " {{ prometheus_podman_user }}"
59+ mode : " 0644"
60+ loop : " {{ _prom_files.results }}"
61+ when : item.stat.exists
62+
3463 - name : Write Prometheus configuration file
3564 ansible.builtin.copy :
3665 content : " {{ prometheus_config | to_nice_yaml() }}"
You can’t perform that action at this time.
0 commit comments