newrelic / ansible-install

Building installation support for our customers are using ansible to manage their infrastructure and services at scale
Apache License 2.0
8 stars 6 forks source link

Ask: How to skip `newrelic_install` when nothing was changed? 🙏 #61

Open meotimdihia opened 9 months ago

meotimdihia commented 9 months ago

I have this task. Is there a way to skip the role when nothing was changed in Ansible? (the role took a lot of time) But I also want it to reinstall when I change targets

tasks:
    - name: Install newrelic
      ansible.builtin.import_role:
        name: "newrelic.newrelic_install"
      vars:
        targets:
          - infrastructure
          - logs
      tags: ["newrelic"]