--- - name: include os specific vars include_vars: "{{ item }}.yml" with_first_found: - "{% if 'id' in ansible_lsb %}{{ ansible_lsb.id }}{% else %}{% ansible_distribution %}_{% if 'major_release' in ansible_lsb %}{{ ansible_lsb.major_release }}{% else %}{{ ansible_distribution_version}} {% endif %}" - "{% if 'id' in ansible_lsb %}{{ ansible_lsb.id }}{% else %}{{ ansible_distribution }}{% endif %}" - "{{ ansible_distribution }}_{{ ansible_distribution_version }}" - "{{ ansible_distribution }}" - "default" tags: - "role::prometheus_node" - "role::prometheus_node:install" - "role::prometheus_node:collectors" - "role::prometheus_node:config" - name: install node exporter import_tasks: "install/{{ item }}.yml" with_first_found: - "{% if 'id' in ansible_lsb %}{{ ansible_lsb.id }}{% else %}{% ansible_distribution %}_{% if 'major_release' in ansible_lsb %}{{ ansible_lsb.major_release }}{% else %}{{ ansible_distribution_version}} {% endif %}" - "{% if 'id' in ansible_lsb %}{{ ansible_lsb.id }}{% else %}{{ ansible_distribution }}{% endif %}" - "{{ ansible_distribution }}_{{ ansible_distribution_version }}" - "{{ ansible_distribution }}" tags: - "role::prometheus_node" - "role::prometheus_node:install" - name: install custom textfile collectors import_tasks: collectors.yml tags: - "role::prometheus_node" - "role::prometheus_node:collectors" - name: configure prometheus node exporter import_tasks: config.yml tags: - "role::prometheus_node" - "role::prometheus_node:config"