-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update_structure * update_structure * update_structure
- Loading branch information
1 parent
2545c78
commit 01d7920
Showing
9 changed files
with
88 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,3 +28,4 @@ galaxy_info: | |
- server | ||
- ubuntu | ||
- centos | ||
- compose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
--- | ||
|
||
- name: Check current docker-compose version. | ||
command: docker-compose --version | ||
register: docker_compose_current_version | ||
changed_when: false | ||
failed_when: false | ||
|
||
- name: Delete existing docker-compose version if it's different. | ||
file: | ||
path: "/usr/local/bin/docker-compose" | ||
state: absent | ||
when: > | ||
docker_compose_current_version.stdout is defined | ||
and docker_compose_version not in docker_compose_current_version.stdout | ||
- name: ensure dependencies are installed on debian | ||
apt: | ||
pkg: ['python-setuptools', | ||
'python-pip'] | ||
state: present | ||
update_cache: true | ||
cache_valid_time: 5400 | ||
changed_when: false | ||
when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu' | ||
|
||
|
||
- name: ensure dependencies are installed on centos/redhat | ||
yum: | ||
pkg: [ | ||
'epel-release', | ||
'python-setuptools' | ||
] | ||
state: present | ||
changed_when: false | ||
when: ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux' | ||
|
||
- name: ensure pip are installed on centos/redhat | ||
yum: | ||
pkg: python-pip | ||
state: present | ||
changed_when: false | ||
when: ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux' | ||
|
||
|
||
- name: install docker compose | ||
pip: | ||
name: docker-compose | ||
state: present | ||
version: '{{ docker_compose_version | default(omit) }}' | ||
changed_when: false | ||
notify: | ||
- restart docker-compose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
--- | ||
|
||
- name: ensure docker config folder is present | ||
changed_when: false | ||
file: | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
--- | ||
|
||
- import_tasks: configure.yml | ||
- import_tasks: install.yml | ||
- import_tasks: docker.yml | ||
- import_tasks: compose.yml | ||
when: docker_compose_install |