Git Product home page Git Product logo

Comments (3)

Tronde avatar Tronde commented on September 23, 2024

Section 3.1.9.1. Platform specific variables seems to cover this topic.

But I have some trouble following the example given there. I don't understand where and how to define a list of required facts for __rolename_required_facts. So my playbook fails with the error '__rolename_required_facts' is undefined.

from automation-good-practices.

richm avatar richm commented on September 23, 2024

Section 3.1.9.1. Platform specific variables seems to cover this topic.

But I have some trouble following the example given there. I don't understand where and how to define a list of required facts for __rolename_required_facts. So my playbook fails with the error '__rolename_required_facts' is undefined.

These are typically defined in vars/main.yml - most of the system roles use this e.g. https://github.com/linux-system-roles/storage/blob/master/vars/main.yml - in some cases where the role was not using vars/ the facts are defined in defaults/main.yml - https://github.com/linux-system-roles/network/blob/main/defaults/main.yml#L125 - as long as they are defined by the time ansible executes tasks/main.yml of the role.

Do you have a use case where you need to use ANSIBLE_GATHERING=explicit or gather_facts: false in your playbooks?

from automation-good-practices.

Tronde avatar Tronde commented on September 23, 2024

from automation-good-practices.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.