Reduce usage of becomes for testing

Change-Id: I481c430310f4a4d91d00a6aad8892e3d848f6531
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2016-03-01 19:13:53 -05:00
parent 50b7894ade
commit a66fbaa7dd

View File

@ -13,12 +13,12 @@
# under the License. # under the License.
--- ---
- hosts: test - hosts: test
become: yes
vars: vars:
rolename: "{{ lookup('pipe', 'pwd') | dirname | basename }}" rolename: "{{ lookup('pipe', 'pwd') | dirname | basename }}"
pre_tasks: pre_tasks:
# Make sure OS does not have a stale package cache. # Make sure OS does not have a stale package cache.
- name: Update apt cache. - name: Update apt cache.
become: yes
apt: apt:
update_cache: yes update_cache: yes
when: ansible_os_family == 'Debian' when: ansible_os_family == 'Debian'
@ -56,6 +56,7 @@
- jenkins_jobs_ini_stat.stat.mode == '0440' - jenkins_jobs_ini_stat.stat.mode == '0440'
- name: Ensure jenkins_jobs.ini was templated. - name: Ensure jenkins_jobs.ini was templated.
become: true
copy: copy:
dest: /etc/jenkins_jobs/jenkins_jobs.ini dest: /etc/jenkins_jobs/jenkins_jobs.ini
src: files/etc/jenkins_jobs/jenkins_jobs.ini src: files/etc/jenkins_jobs/jenkins_jobs.ini