diff --git a/playbook.yml b/playbook.yml index 28a5b0c..276924a 100644 --- a/playbook.yml +++ b/playbook.yml @@ -61,4 +61,10 @@ - hosts: cups roles: - - cups \ No newline at end of file + - cups + +# we want node metrics on the satisfactory server +- hosts: satisfactory + roles: + - docker + - prometheus.prometheus.node_exporter \ No newline at end of file diff --git a/requirements.yml b/requirements.yml new file mode 100644 index 0000000..5791901 --- /dev/null +++ b/requirements.yml @@ -0,0 +1,2 @@ +collections: + - name: prometheus.prometheus \ No newline at end of file diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml index 454c409..f5fda68 100644 --- a/roles/common/tasks/main.yml +++ b/roles/common/tasks/main.yml @@ -35,6 +35,9 @@ include_tasks: user.yml with_dict: '{{ users }}' +- name: Configure monitoring + include_tasks: monitoring.yml + - name: Configure hostname hostname: name: '{{ inventory_hostname }}' diff --git a/roles/common/tasks/monitoring.yml b/roles/common/tasks/monitoring.yml new file mode 100644 index 0000000..bd9c9e3 --- /dev/null +++ b/roles/common/tasks/monitoring.yml @@ -0,0 +1,4 @@ +- name: Import prometheus node_exporter role + import_role: + name: prometheus.prometheus.node_exporter + when: ansible_virtualization_role == 'host'