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

ERROR! the role 'ansible-prometheus' was not found #112

Open
garyyang6 opened this issue Mar 26, 2023 · 0 comments
Open

ERROR! the role 'ansible-prometheus' was not found #112

garyyang6 opened this issue Mar 26, 2023 · 0 comments

Comments

@garyyang6
Copy link

I installed the collations with the command,

ansible-galaxy install ernestas-poskus.ansible-prometheus

ansible-galaxy list
/home/ubuntu/.ansible/roles
ernestas-poskus.ansible-prometheus, v4.18.0

I run the command as follows:
ansible-playbook -i hosts -l group1 playbook.yml --check

I got errors as follows:

ERROR! the role 'ansible-prometheus' was not found in /home/ubuntu/works/roles:/home/ubuntu/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:/home/ubuntu/works

The error appears to be in '/home/ubuntu/works/playbook.yml': line 5, column 7, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

  roles:
    - role: ansible-prometheus
      ^ here

As follows is the playbook:

- name: Installing Prometheus on hosted machine
  hosts: group1
    #sudo: yes
  roles:
    - role: ansible-prometheus
      prometheus_config_scrape_configs:
        - job_name: 'prometheus'
          honor_labels: true
          scrape_interval: '15s'
          scrape_timeout: '3s'
          metrics_path: '/metrics'
          scheme: 'http'
          static_configs:
            - targets:
                - 'localhost:9090' # Prometheus itself
                - 'localhost:9100' # Node exporter
        - job_name: 'consul-services'
          consul_sd_configs:
            - server: "localhost:8500"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant