Sometimes I don’t think to much about it so I end up using different styles of task naming in the same project, for example:
Install the package (imperative form)
Installation of the package (noun form)
Installing the package (progressive form)
One ought to stick to the one form… but which one? ChatGPT is insisting that imperative form i.e “Install the package” is the best one, the recommended one and the most used one. While it makes all the sense if you are reading the code, I don’t see much sense for it when you are reading the Ansible output. Let me explain:
# Install the package # <- Makes more sense if written in the comment
- name: "Install the package" # <- Makes less sense because this is what the
package: # the user sees in Ansible output
...
The user is more interested in knowing what Ansible is currently doing and what is the current progress. This is especially true for slow tasks that loop over a number of items. So the following gives the user a nice feedback of a long running task:
The noun form i.e. “Installation of the package” is like a neutral, middle ground.
The case for progressive form being the preferred one can be seen in Ansible’s internal tasks like “Gathering facts” or “Validating arguments against arg spec …”.
There are only two hard things in Computer Science: Cache invalidation and naming things
I’m not sure if there’s an easy answer to you question. If you work alone, use whatever works best for you. If you work together with others, use whatever works best for your team.
Probably not a very helpful answer, but there it is… it depends
Personally, I think I would prefer the imperative form (“install” instead of in “installation” or “installing”). I would also prefer “install” over “ensure”, but there’s no accounting for taste.
BTW if you’re installing several packages like Apache, MySQL and PHP in a loop to create a LAMP stack, I think “install (or whatever) packages” isn’t really helpful. In that case, “install web server and dependencies” or “install LAMP stack” might be better. People will see what this task is about then. But as I’ve said: Whatever works best for you / you and your team.