Created
April 22, 2014 16:06
-
-
Save anonymous/11184928 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: preset old_ubuntu variable | |
set_fact: old_ubuntu=no | |
- name: check whether it's Ubuntu < 14 | |
set_fact: old_ubuntu=yes | |
when: ansible_lsb.id == "Ubuntu" and ansible_lsb.major_release|int < 14 | |
- name: add rsyslog apt key | |
apt_key: url=http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xAEF0CF8E | |
when: old_ubuntu == "yes" | |
- name: add rsyslog repository | |
apt_repository: repo='ppa:adiscon/v7-stable' | |
when: old_ubuntu == "yes" | |
- name: set package name for Ubuntu < 14 | |
set_fact: rsyslog_pkg=rsyslog | |
when: old_ubuntu == "yes" | |
- name: set package name for Ubuntu >= 14 | |
set_fact: rsyslog_pkg=rsyslog-gnutls | |
when: old_ubuntu != "yes" | |
- name: upgrade rsyslog with tls (ubuntu < 14) | |
apt: pkg={{ rsyslog_pkg }} state=latest update_cache=yes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment