From 7a9df911ba1a9db868c088a0a6eb96013d84338c Mon Sep 17 00:00:00 2001 From: Marcus Klein Date: Fri, 10 Nov 2023 12:26:27 +0100 Subject: [PATCH] Upgrade Prometheus node exporter to Prometheus collection Change-Id: I182c6114ee525090d2661bb0d48781e292d66919 --- prometheus/README.rst | 2 +- prometheus/ansible-role-requirements.yml | 5 ----- prometheus/installNodeExporter.yml | 8 +++++++- prometheus/requirements.yml | 6 ++++++ 4 files changed, 14 insertions(+), 7 deletions(-) delete mode 100644 prometheus/ansible-role-requirements.yml create mode 100644 prometheus/requirements.yml diff --git a/prometheus/README.rst b/prometheus/README.rst index f2c34c1b..49f8c238 100644 --- a/prometheus/README.rst +++ b/prometheus/README.rst @@ -25,7 +25,7 @@ Downloading role dependencies .. code-block:: bash cd /opt/openstack-ansible-ops/prometheus - ansible-galaxy install -r ansible-role-requirements.yml + ansible-galaxy install -r requirements.yml Install node_exporter diff --git a/prometheus/ansible-role-requirements.yml b/prometheus/ansible-role-requirements.yml deleted file mode 100644 index 68f9b8c4..00000000 --- a/prometheus/ansible-role-requirements.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -- name: node-exporter - scm: git - src: https://github.com/cloudalchemy/ansible-node-exporter - version: master diff --git a/prometheus/installNodeExporter.yml b/prometheus/installNodeExporter.yml index e840f5ca..384b6622 100644 --- a/prometheus/installNodeExporter.yml +++ b/prometheus/installNodeExporter.yml @@ -12,9 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. +- name: Refresh local facts + hosts: hosts + tasks: + - name: Refresh local facts + setup: + - name: node_exporter hosts: hosts vars_files: - vars/variables.yml roles: - - role: node-exporter + - role: prometheus.prometheus.node_exporter diff --git a/prometheus/requirements.yml b/prometheus/requirements.yml new file mode 100644 index 00000000..16e25688 --- /dev/null +++ b/prometheus/requirements.yml @@ -0,0 +1,6 @@ +--- + +collections: +- name: prometheus.prometheus + version: 0.8.0 + type: galaxy