From 5a835ee806cac515edf007325daf7f77eb29d6c3 Mon Sep 17 00:00:00 2001 From: lifeofguenter Date: Mon, 16 Nov 2015 21:54:02 +0200 Subject: [PATCH] Fixes #1: Privilege escalation --- meta/main.yml | 6 +++--- tasks/timezone.yml | 6 +++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meta/main.yml b/meta/main.yml index 0daf0e3..19af70f 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -4,7 +4,7 @@ galaxy_info: description: Role for managing timezone. company: license: license (Apache 2.0) - min_ansible_version: 1.5 + min_ansible_version: 1.9 platforms: - name: Ubuntu versions: @@ -14,6 +14,7 @@ galaxy_info: versions: - squeeze - wheezy + - jessie - name: EL versions: - 6 @@ -24,5 +25,4 @@ galaxy_info: - 20 categories: - system -dependencies: [] - +dependencies: [] \ No newline at end of file diff --git a/tasks/timezone.yml b/tasks/timezone.yml index 6ede638..7e5b775 100644 --- a/tasks/timezone.yml +++ b/tasks/timezone.yml @@ -9,20 +9,23 @@ apt: name={{timezone_package}} update_cache=yes cache_valid_time=86400 - state=present + state=present when: ansible_os_family == 'Debian' tags: ['timezone'] + become: yes - name: Install tzdata for RedHat based distros yum: name={{timezone_package}} state=present when: ansible_os_family == 'RedHat' tags: ['timezone'] + become: yes - name: Set timezone config template: src="timezone-{{ansible_os_family}}.j2" dest={{timezone_file}} tags: ['timezone'] + become: yes - name: Set link to localtime file: state=link @@ -30,3 +33,4 @@ dest={{localtime_file}} force=yes tags: ['timezone'] + become: yes