Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ostree systems cannot write to /usr; use /etc instead #55

Merged
merged 1 commit into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions roles/elasticsearch/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,20 @@
- elasticsearch_metrics_provider == 'pcp'
- elasticsearch_agent | d(false) | bool

- name: Check if system is ostree
stat:
path: "{{ ostree_booted_file }}"
vars:
ostree_booted_file: /run/ostree-booted
register: __ostree_booted_stat

- name: Ensure correct service path for ostree systems
when:
- __ostree_booted_stat.stat.exists
- __elasticsearch_service_path != "/etc/systemd/system"
set_fact:
__elasticsearch_service_path: /etc/systemd/system

- name: Ensure PCP Elasticsearch export service exists
template:
src: pcp2elasticsearch.service.j2
Expand Down
14 changes: 14 additions & 0 deletions roles/spark/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,20 @@
- spark_metrics_provider == 'pcp'
- spark_metrics_agent | d(false) | bool

- name: Check if system is ostree
stat:
path: "{{ ostree_booted_file }}"
vars:
ostree_booted_file: /run/ostree-booted
register: __ostree_booted_stat

- name: Ensure correct service path for ostree systems
when:
- __ostree_booted_stat.stat.exists
- __spark_service_path != "/etc/systemd/system"
set_fact:
__spark_service_path: /etc/systemd/system

- name: Ensure PCP Spark export service exists
template:
src: pcp2spark.service.j2
Expand Down