From 682043b2f7a61fc6c74fb031d39fc26f97ea14f0 Mon Sep 17 00:00:00 2001 From: Paul Belanger Date: Wed, 9 Nov 2016 11:28:55 -0500 Subject: [PATCH] Clean up become logic for ansible 2.2 Also clean up bindep dependencies. Change-Id: I76e721c276a0bef3cb5adc06ecfbc0450cb21c56 Signed-off-by: Paul Belanger --- bindep.txt | 6 +++++- tasks/install.yaml | 1 + tasks/install/git.yaml | 2 ++ tasks/install/package.yaml | 1 + tasks/install/pip.yaml | 1 + tasks/main.yaml | 1 - 6 files changed, 10 insertions(+), 2 deletions(-) diff --git a/bindep.txt b/bindep.txt index cac9e3d..3e30527 100644 --- a/bindep.txt +++ b/bindep.txt @@ -1,4 +1,8 @@ # This is a cross-platform list tracking distribution packages needed by tests; # see http://docs.openstack.org/infra/bindep/ for additional information. -python-pip +libffi-dev [platform:dpkg] +libffi-devel [platform:rpm] +libselinux-python [platform:rpm] +libssl-dev [platform:dpkg] +openssl-devel [platform:rpm] diff --git a/tasks/install.yaml b/tasks/install.yaml index c4f5de0..99ece34 100644 --- a/tasks/install.yaml +++ b/tasks/install.yaml @@ -18,6 +18,7 @@ when: jenkins_job_builder_build_depends is not defined - name: Ensure build dependencies are installed. + become: yes package: name: "{{ item }}" state: installed diff --git a/tasks/install/git.yaml b/tasks/install/git.yaml index cdf44ff..1d6560a 100644 --- a/tasks/install/git.yaml +++ b/tasks/install/git.yaml @@ -13,12 +13,14 @@ # under the License. --- - name: Git clone jenkins job builder. + become: yes git: dest: "{{ jenkins_job_builder_git_dest }}" repo: "{{ jenkins_job_builder_git_uri }}" version: "{{ jenkins_job_builder_git_version }}" - name: Pip install jenkins_job_builder from local git repo. + become: yes pip: extra_args: "{{ jenkins_job_builder_pip_extra_args|default(omit) }}" name: "file://{{ jenkins_job_builder_git_dest }}" diff --git a/tasks/install/package.yaml b/tasks/install/package.yaml index 5440a1e..e9f2a2b 100644 --- a/tasks/install/package.yaml +++ b/tasks/install/package.yaml @@ -13,6 +13,7 @@ # under the License. --- - name: Install jenkins-job-builder from package. + become: yes package: name: "{{ jenkins_job_builder_package_name }}" state: installed diff --git a/tasks/install/pip.yaml b/tasks/install/pip.yaml index 7e76237..d4510da 100644 --- a/tasks/install/pip.yaml +++ b/tasks/install/pip.yaml @@ -13,6 +13,7 @@ # under the License. --- - name: Install jenkins job builder using pip. + become: yes pip: extra_args: "{{ jenkins_job_builder_pip_extra_args|default(omit) }}" name: "{{ jenkins_job_builder_pip_name }}" diff --git a/tasks/main.yaml b/tasks/main.yaml index db7e415..70a00e3 100644 --- a/tasks/main.yaml +++ b/tasks/main.yaml @@ -16,6 +16,5 @@ include_vars: "{{ ansible_os_family }}.yaml" - include: install.yaml - become: yes - include: config.yaml