--- - name: check LTS repo for squeeze tags: - update - normal apt_repository: repo='deb http://http.debian.net/debian/ squeeze-lts main' state=present when: ansible_distribution == 'Debian' and ansible_distribution_major_version == '6' - name: apt-get update for my Monitoring 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 tags: update when: ansible_distribution == 'Debian' ignore_errors: yes - name: apt-get update tags: normal apt: update_cache=yes ignore_errors: no when: ansible_distribution == 'Debian' - name: apt-get upgrade (safe) tags: normal apt: upgrade=safe # http://docs.ansible.com/apt_module.html when: ansible_distribution == 'Debian' - name: yum update tags: normal yum: name=* state=latest when: ansible_distribution == 'CentOS' or ansible_distribution == 'CloudLinux' or ansible_distribution == 'Virtuozzo'