On 30. des. 2016 19:36,
vmadh...@gmail.com wrote:
> I am sure this is not the right way to code and it could be combined into 1
> lineinfile option using with_items. But, for now, I want to try this
> separately and see if I could. If with_items is the right way, please let
> me know and I can change it. But, here is the situation though. When I run
> this code, it is updating the stanza which is at the end (updating gpgcheck
> in [centosplus] stanza). I understand it is trying to find the last
> instance of "gpgcheck" and updating the value. But, I want only these 2
> stanzas to be updated and nothing before that or after that. How can I
> achieve that?? Hope my question makes sense.
>
>
> Any help is greatly appreciated.