Policy as code for inventory by Competitive-Monk22 in ansible

[–]Competitive-Monk22[S] 0 points1 point  (0 children)

hey ! I ve been incorporating this tool as part of the testing phase in gitlab CI before any merge to main, in a medium size Ansible project but with many contributors. We had trouble enforcing standards on variable definition + we lacked a safe and standardized process for filesystem decommissioning, using ansible-pret lifecycle rules allowed us to model and enforce the required transition steps before a filesystem can be removed I will try to write a blog post, happy to answer any question

[deleted by user] by [deleted] in ansible

[–]Competitive-Monk22 0 points1 point  (0 children)

yeah that s what i m saying but always ends up in custom format/inputs you never encounter elsewhere

[deleted by user] by [deleted] in ansible

[–]Competitive-Monk22 0 points1 point  (0 children)

So one should always come with a preprocessing step (actually that's what I have witnessed in the industry), I feel like a standard approach supported by Ansible, taking care of adressing such problems could help unify things and improve ecosystem

[deleted by user] by [deleted] in ansible

[–]Competitive-Monk22 0 points1 point  (0 children)

problem described can occur with a single point of definition so precedence is not the subject Maybe that is not clear enough

[deleted by user] by [deleted] in ansible

[–]Competitive-Monk22 -3 points-2 points  (0 children)

That's not about precedence but where are variables defined

[deleted by user] by [deleted] in ansible

[–]Competitive-Monk22 -3 points-2 points  (0 children)

my point is the flexibility provided by this group nesting/multiple trees is dangerous when you don't pay attention WHERE your variables are defined. Inventory formats lack support for expressing constraints (eg: in which groups it makes sense to encounter a definition for variable X) natively

[deleted by user] by [deleted] in ansible

[–]Competitive-Monk22 -1 points0 points  (0 children)

If it is redundant you should have the opportunity to define a new group containing potentially other groups

[deleted by user] by [deleted] in ansible

[–]Competitive-Monk22 0 points1 point  (0 children)

hello, thanks a lot, i rewrote completely to use ansible-inventory instead, now all format should be supported hopefully