The use of `/var/run` was deprecated by FHS 3.0 nine years ago, so it's
time to finally get rid of it where possible. The canonical directory
for run-time variable data is `/run` nowadaya,s with `/var/run` just
being a symbolic link for backward compatibilty and to ease transition.
This shell command doesn't change state on the system, therefore
it is safe to set `changed_when` to `false`, and we can also
set `check_mode` to `false` here to allow execution when run in
check mode.
Without `pipefail` Ansible cannot detect if there is an error executing
the command before the pipe as the return code of the shell only
reflects the return code of the last command. As not all shells support
`pipefail` (e.g., `ash`, `dash`) we also enfore the use of `bash` in
this case.
The command doesn't change anything on the system, and the registered
variable `disk_usage` is never being used, moreover it gets overwritten
by the next task.
This change forces `df(1)` to output each file system on a single
line by setting the `-P` flag (POSIX output format). Without it,
some versions of `df(1)` split the output into multiple lines if the
length of some fields like "Filesystem" exceeds a certain limit. As a
consequence, the `awk(1)` expression might fail to catch the correct
fields.
Please note that this fixes a file which is also wrongly named, which is
being addressed in PR #151.
Relates to PR #151.
Fixes issue #137.