Git Product home page Git Product logo

Comments (3)

robertdebock avatar robertdebock commented on June 14, 2024

Hi,

If I understand you correctly, you'd like to have all tasks have a prefix. Should that prefix be selected from:

  • prepare
  • install
  • environment
  • config

Or is that prefix free-format?

I don't see why a prefix solves the observability issue, if unique name:s are used, that should help the User right?

And another issue; ansible-lint would like all named tasks to start with a capital.

I'm curious to your way of thinking, please let me know.

from ansible-role-users.

dzintars avatar dzintars commented on June 14, 2024

First of all, this is only my opinionated suggestion. 😃

By the rules of ansible-lint, prefix should match the file name in which the task is defined.
Capitalized named tasks rule applies to - name: filename | This is the capitalized task name part. Not to the prefix itself.

In your case prefixes would be:

  • asert | Some task name in asert.yaml
  • group | Other task in group.yaml
  • user | One more task in user.yaml

enable_list: - name[prefix] should be explicitly enabled in ansible-lint config.
There is some random documentation i just found about it Good Practices for Ansible - GPA

All of this does not matter much if you are working just with one or few roles.
But when you have entire playbooks which consumes 20-50-100 roles, this becomes quite important.
Because you have such generic role, i see it being used in larger playbooks and thus IMHO task naming becomes important.

I would suggest to try it locally and to play with --list-tasks on entire playbook to see the effect.

from ansible-role-users.

robertdebock avatar robertdebock commented on June 14, 2024

This one if fixes, actually on all my roles.

And; indeed it's useful! Thanks for then hint. 👊🏻

from ansible-role-users.

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.