Skip to content

Commit faabfc3

Browse files
committed
vagrant: don't try to always install python package.
1 parent 53ac664 commit faabfc3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

vagrant/provisioning/bootstrap.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,21 @@
33
# Ubuntu 16.04. doesn't install python 2.x anymore and we have to install
44
# it manually to be able to run Ansible playbooks.
55

6+
- name: Determining whether python 2.7 is installed
7+
stat:
8+
path: /usr/bin/python2.7
9+
get_md5: no
10+
get_checksum: no
11+
register: python27
12+
613
- name: Updating packages cache
714
raw: apt-get update
815
become: yes
916
become_method: sudo
17+
when: not python27.stat.exists
1018

1119
- name: Installing python
1220
raw: apt-get install -y python2.7-minimal
1321
become: yes
1422
become_method: sudo
23+
when: not python27.stat.exists

0 commit comments

Comments
 (0)