main.yml 444 B

12345678910111213141516
  1. ---
  2. - name: Update all packages
  3. pkgng:
  4. name: "*"
  5. state: latest
  6. - name: Fetch any new FreeBSD updates
  7. shell: freebsd-update fetch
  8. when: ansible_distribution == 'FreeBSD'
  9. register: result_update
  10. changed_when: "'No updates needed' not in result_update.stdout"
  11. - name: Install FreeBSD updates
  12. shell: freebsd-update install
  13. when: ansible_distribution == 'FreeBSD' and result_update.changed
  14. register: result_update_install