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:
- name: "Installing the package..."
package:
...
loop: "{{ package_list }}"
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 …”.
What are your thoughts?
- Imperative form → Install the package
- Noun form → Installation of the package
- Progressive form → Installing the package
- Other