Giter Club home page Giter Club logo

Comments (10)

nazunalika avatar nazunalika commented on September 27, 2024 2

I guess this is a good place to bring this up, as it is not part of our current ansible structure.

How do we want to handle collections? Specifically levering Galaxy collections https://galaxy.ansible.com/ so we are duplicating efforts that are already well maintained?

Our ansible structure emulates loosely the Fedora and CentOS ansible structure - We will be using ansible collections that are pulled as defined by the requirements.yml. For example, we are already defining the freeipa collection.

from infrastructure.

greg-hellings avatar greg-hellings commented on September 27, 2024 1

As someone who helps to maintain some of the following, and writes a TON of Ansible code...

  • ansible-lint is THE linter for Ansible code and should definitely be applied
  • yamllint is THE linter for YAML in general and should also be applied
  • Molecule is a tester for Ansible playbooks and roles and we should think about wrapping this around important bits
  • ansible-test is the official test tool for Ansible modules and, likewise, should be wrapped around any custom modules we write
  • tox-ansible is a plugin for tox that brings together running most of the above on Ansible code

Putting all of them into pre-commit is not too difficult, either.

from infrastructure.

oranenj avatar oranenj commented on September 27, 2024

What are the automatic tools that could help enforce this? For shell scripts, running at least ShellCheck is probably a good idea.

from infrastructure.

Darkbat91 avatar Darkbat91 commented on September 27, 2024

Agreed we need to get something formalised before we get too many contributions.

Highly recommend we get ansible-lint set up and make it a requirement on the Ansible side.

Generally pre-commit is not a bad idea as well but not sure how restrictive we want this to be.

from infrastructure.

dpavlos avatar dpavlos commented on September 27, 2024

+1 for ansible-lint

from infrastructure.

danielkubat avatar danielkubat commented on September 27, 2024

ansible-lint GH Action: https://github.com/ansible/ansible-lint-action (PR #24 merged)
shellcheck GH Action: https://github.com/ludeeus/action-shellcheck
yamllint GH Action: https://github.com/ibiqlik/action-yamllint (PR #13 merged)

from infrastructure.

derekmpage avatar derekmpage commented on September 27, 2024

I guess this is a good place to bring this up, as it is not part of our current ansible structure.

How do we want to handle collections? Specifically levering Galaxy collections https://galaxy.ansible.com/ so we are duplicating efforts that are already well maintained?

from infrastructure.

lisenet avatar lisenet commented on September 27, 2024

+1 for ShellCheck. Standardising the way things are developed is crucial.

from infrastructure.

Gorian avatar Gorian commented on September 27, 2024

I'd just like to point out that something like shellcheck and having a style guide are not necessarily the same thing - for example, shellcheck won't care if you comment your functions correctly, or whether you put do on the same line as a forloop or not, etc. but those sorts of things are still important for consistency in a large project - arguably, the correct placement of braces or whether then goes on the same line as if or the next is less important than tabs vs. spaces, but it's still important to define these things in the beginning rather than later when you realize it causes issues and then have to refactor old code.

from infrastructure.

christophedumont5 avatar christophedumont5 commented on September 27, 2024

+1 for molecule and testinfra

from infrastructure.

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.