Hi, thanks for the reply. What you describe will help a bit, but is not error proof when you have thousands of line of code(and any infrastructure will reach that point quickly). Human make mistake, or are lazy, so eventually, 2 pieces of code that change the same setting will happen. One really nice thing about Powershell DSC is that it balks when you try to do something like that, so I was hoping it would be the same with ansible.
On Friday, 25 January 2019 09:23:24 UTC-5, Sylvain Martel wrote: > > Hi, > > We are new to using ansible, and I saw something while going through > our early code that had me worried. I have CoderA and CoderB that are > starting to create roles and tasks. In one Task, coderA adds IIS features, > but coderB, in another role , also adds some IIS features in a Task, and > also make sure other features are absent, but some of those features are > installed by CoderA role. You can see the problem when both roles will > be applied to the same machine. > > In powershell DSC, there are failsafe in place to prevent this: When > code tries to change something that was defined somewhere else, powershell > will raise an error at the mof creation and prevent this. Is there some > failsafe n Ansible too to prevent a task from undoing what another does? > If not, what is the best way to avoid this?(code review won't catch them > all) > > Thanks :) > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/2e77bd7e-6770-4afa-bdca-8cde705456fb%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
