Skip to content

Commit

Permalink
feat: add variables to switch pip version
Browse files Browse the repository at this point in the history
Merge branch 'FabGre-FabGre/fix-docker-compose-install'
  • Loading branch information
franklinkim committed Jul 10, 2019
2 parents 949365f + 0fd4a7f commit eeb0923
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
lint:
ansible-lint .

ubuntu18.04:
vagrant up bionic
vagrant destroy -f bionic

ubuntu16.04:
vagrant up xenial
vagrant destroy -f xenial

centos7:
vagrant up centos7
vagrant destroy -f centos7
7 changes: 5 additions & 2 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@

# version
docker_compose_version:
# optionally set to specific version (pip==9.0.3)
docker_compose_pip_version: pip
# dependencies e.g. python3-pip
docker_compose_packages:
- python-pip
# pip executable e.g. pip3
docker_compose_pip_executable: pip
5 changes: 3 additions & 2 deletions tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

- name: Installing packages
package:
name: python-pip
name: "{{ docker_compose_packages }}"
state: present

- name: Installing docker compose
pip:
name: docker-compose
version: "{{ docker_compose_version if docker_compose_version else omit }}"
version: "{{ docker_compose_version | default(omit) }}"
executable: "{{ docker_compose_pip_executable }}"
state: present

0 comments on commit eeb0923

Please sign in to comment.