On Thu, Oct 09, 2014 at 11:25:58PM +0200, Antoine Jacoutot wrote: > > Sorry, I should probably have been more clear on the reason I need it :). > > > > The main issue from the ansible perspective is to know if we are _going_ > > to change something or not. The user may for example run ansible in > > --check mode where it should only report if it is about to change > > something or not. > > Ok but then I don't understand why you need to know the "default" > flags :-) > If you run rcctl status, it will tell you the current flags of the > daemon; if these differ from the new flags you want to pass ansible > then 'ansible --check' will report you that it will change the flags. > Which is correct, no ? > Or did I misundertand something (I probably did...). >
The problem occurs when I try to manage a service like nfsd which has a default set of flags. Consider the following commands, which basically performs what ansible does when the user is not supplying any extra arguments: --- # rcctl status nfsd NO # rcctl enable nfsd # rcctl status nfsd -tun 4 # --- If I now run the tool again, still without any supplied arguments, it will compare the empty set of user supplied flags to "-tun 4" which always differs. So ansible will now think it needs to change something "forever" :). To solve this I need the default flags to compare to the output of 'status'. Regards, Patrik Lundin