- ---
- - name: Update all packages
- pkgng:
- name: "*"
- state: latest
- - name: Fetch any new FreeBSD updates
- shell: freebsd-update fetch
- when: ansible_distribution == 'FreeBSD'
- register: result_update
- changed_when: "'No updates needed' not in result_update.stdout"
- - name: Install FreeBSD updates
- shell: freebsd-update install
- when: ansible_distribution == 'FreeBSD' and result_update.changed
- register: result_update_install
|