You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
969 B

  1. ---
  2. - name: check LTS repo for squeeze
  3. tags:
  4. - update
  5. - normal
  6. apt_repository: repo='deb http://http.debian.net/debian/ squeeze-lts main' state=present
  7. when: ansible_distribution == 'Debian' and ansible_distribution_major_version == '6'
  8. - name: apt-get update for my Monitoring
  9. shell: apt-get update -qq > /var/lib/apt/update_output 2>&1 && [ ! -s /var/lib/apt/update_output ] && date -u > /var/lib/apt/update_success
  10. tags: update
  11. when: ansible_distribution == 'Debian'
  12. ignore_errors: yes
  13. - name: apt-get update
  14. tags: normal
  15. apt: update_cache=yes
  16. ignore_errors: no
  17. when: ansible_distribution == 'Debian'
  18. - name: apt-get upgrade (safe)
  19. tags: normal
  20. apt: upgrade=safe # http://docs.ansible.com/apt_module.html
  21. when: ansible_distribution == 'Debian'
  22. - name: yum update
  23. tags: normal
  24. yum: name=* state=latest
  25. when: ansible_distribution == 'CentOS' or ansible_distribution == 'CloudLinux' or ansible_distribution == 'Virtuozzo'