role-deploy_to_systems.yaml 509 B

12345678910111213141516171819
  1. - hosts: all
  2. tasks:
  3. - name: Install python3-dnf or python2-dnf if distro flavor is RH-like and version is 7
  4. dnf:
  5. name:
  6. - python3-dnf
  7. - python2-dnf
  8. state: present
  9. when:
  10. - ansible_facts.distribution_file_variety == "RedHat"
  11. - ansible_facts['distribution_major_version'] == '7'
  12. ignore_errors: yes
  13. roles:
  14. - { role: DataDog.datadog, become: yes }
  15. vars:
  16. datadog_api_key: "{{ dd_api_key }}"
  17. datadog_site: ddog-gov.com