On Saturday 19 June 2021 at 00:01:02, jane p wrote:

> On Fri, Jun 18, 2021 at 4:26 PM Antony Stone wrote:
> > 
> > If you install a second time (with the same playbook) you want no further
> > changes to be made, because what needed to be installed has already been
> > installed.
> > 
> > If you update, you want the system to be updated (again, pretty obvious).
> 
> It is not trivial to distinguish between 'install a second time' and
> 'update'. When the playbook starts, it is not known whether there are any
> changes, and which specific changes have been made.

No, but it is obvious what the desired outcome is.

If the machine is already in that state, you do not want anything to change.

If the machine is not in that state, you want ansible to bring it into that 
state.

> > If you update a second time (with the same playbook) you want no further
> > changes to be made, because the system has already been updated, nothing
> > further needs updating; the system should be left as it is.
> 
> Installing for the first time and updating-in-place may not be identical.
> Consider a system that involves a web server.  On initial install the
> server is started at the end, after all the apps are installed.
> On subsequent update the server is already running.  Should the web
> server be reloaded?  If apps are updated, then yes, if not, then not
> necessarily.

Reloading a web server is (in my opinion) not a state change.

Reconfiguring it would be.

> Encoding the dependency for each app update to web server reload is
> complexity of the system expressed in Ansible.
> Not encoding the dependency for each update, and reloading the web
> server in all cases is breaking the 'no state changes if nothing got
> updated' requirement at least some of the time.

What's your definition of a state change?

> > What you would like to see, or what example can you give, as a "simple
> > implementation" which does not leave the target system in the same state
> > after every run?
> 
> I think leaving the target system in the same state after every run is
> essential.

Agreed.

> The question is about whether state changes within the run are allowed.

Let's talk about what a "state change" is then :)

...although not with me further for now - it's now midnight in my personal 
timezone...


Antony.

-- 
"640 kilobytes (of RAM) should be enough for anybody."

 - Bill Gates

                                                   Please reply to the list;
                                                         please *don't* CC me.

Reply via email to