Fix deprecated becomes logic

Our previous way of doing becomes with include is no longer supported
by ansible. Switch to the supported way of handling becomes.

Change-Id: Ia213305fd874251b7abc6ee12c7058a7b459b61b
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2016-11-08 18:30:28 -05:00
parent 8073a27f75
commit a800a513ed
5 changed files with 5 additions and 2 deletions

View File

@ -18,6 +18,7 @@
when: shade_build_depends is not defined
- name: Ensure build dependencies are installed.
become: yes
package:
name: "{{ item }}"
state: installed

View File

@ -13,12 +13,14 @@
# under the License.
---
- name: Git clone shade.
become: yes
git:
dest: "{{ shade_git_dest }}"
repo: "{{ shade_git_uri }}"
version: "{{ shade_git_version }}"
- name: Pip install shade from local git repo.
become: yes
pip:
extra_args: "{{ shade_pip_extra_args|default(omit) }}"
name: "file://{{ shade_git_dest }}"

View File

@ -13,6 +13,7 @@
# under the License.
---
- name: Install shade using pip.
become: yes
pip:
extra_args: "{{ shade_pip_extra_args|default(omit) }}"
name: "{{ shade_pip_name }}"

View File

@ -16,4 +16,3 @@
include_vars: "{{ ansible_os_family }}.yaml"
- include: install.yaml
become: yes

View File

@ -13,12 +13,12 @@
# under the License.
---
- hosts: test
become: yes
vars:
rolename: "{{ lookup('pipe', 'pwd') | dirname | basename }}"
pre_tasks:
# Make sure OS does not have a stale package cache.
- name: Update apt cache.
become: yes
apt:
update_cache: yes
when: ansible_os_family == 'Debian'