fix for 'No updates are available to install' error

resolves common problem of false `No updates are available to install` errors after updating FreeBSD base OS files.

```yml
TASK [freebsd-update : Install FreeBSD updates] ****************************************************
fatal: [freebsd6]: FAILED! => {"changed": true, "cmd": ["freebsd-update", "install", "--not-running-from-cron"], "delta": "0:00:00.274477", "end": "2018-05-14 18:13:56.977638", "msg": "non-zero return code", "rc": 1, "start": "2018-05-14 18:13:56.703161", "stderr": "rm: filelist: No such file or directory", "stderr_lines": ["rm: filelist: No such file or directory"], "stdout": "src component not installed, skipped\nInstalling updates...", "stdout_lines": ["src component not installed, skipped", "Installing updates..."]}
changed: [freebsd5]

TASK [freebsd-update : debug] **********************************************************************
```
This commit is contained in:
Bryan Black 2018-05-14 11:29:22 -07:00 committed by GitHub
parent 3981829d0a
commit 58ce5f14f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -13,6 +13,7 @@
command: freebsd-update install --not-running-from-cron
when: ansible_distribution == 'FreeBSD' and result_update.changed and not ansible_check_mode
register: result_update_install
changed_when: "'No updates are available to install' not in result_update_install.stdout"
- debug: var=result_update_install
when: result_update_install.changed