From 17c8dcedea53fa333220d003dfcb666943f36ba8 Mon Sep 17 00:00:00 2001 From: Paul Belanger Date: Sat, 13 Feb 2016 18:52:24 -0500 Subject: [PATCH] Update to ansible 2.0 Change-Id: I046c2ae83bb73de9478697ecc86e6929fa43aa4f Signed-off-by: Paul Belanger --- handlers/main.yaml | 2 +- meta/main.yml | 4 ++-- requirements.txt | 2 +- tasks/main.yaml | 6 +++--- tests/test.yaml | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/handlers/main.yaml b/handlers/main.yaml index 1669b3d..5be4066 100644 --- a/handlers/main.yaml +++ b/handlers/main.yaml @@ -13,7 +13,7 @@ # under the License. --- - name: Restart jenkins + become: yes service: name: jenkins state: restarted - sudo: yes diff --git a/meta/main.yml b/meta/main.yml index 48f9d84..3395eda 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -14,10 +14,10 @@ --- galaxy_info: author: Paul Belanger - description: | + description: Ansible role to manage Jenkins company: Red Hat, Inc. license: Apache - min_ansible_version: 1.9 + min_ansible_version: 2.0 platforms: - name: EL versions: diff --git a/requirements.txt b/requirements.txt index 90d4055..1ab0ddd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ -ansible +ansible>=2.0.0 diff --git a/tasks/main.yaml b/tasks/main.yaml index 77b2d92..404c9b1 100644 --- a/tasks/main.yaml +++ b/tasks/main.yaml @@ -16,10 +16,10 @@ include_vars: "{{ ansible_os_family }}.yaml" - include: install.yaml - sudo: yes + become: yes - include: config.yaml - sudo: yes + become: yes - include: service.yaml - sudo: yes + become: yes diff --git a/tests/test.yaml b/tests/test.yaml index c8d9673..ccbfb91 100644 --- a/tests/test.yaml +++ b/tests/test.yaml @@ -13,7 +13,7 @@ # under the License. --- - hosts: localhost - sudo: yes + become: yes vars: rolename: "{{ lookup('pipe', 'pwd') | dirname | basename }}"