This repository has been archived by the owner on Feb 6, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
### Changed - initial commit
- Loading branch information
elnebuloso
authored and
elnebuloso
committed
Dec 3, 2017
1 parent
feb47d7
commit d858eb2
Showing
11 changed files
with
147 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.idea |
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,29 @@ | ||
--- | ||
language: python | ||
python: "2.7" | ||
|
||
# Use the new container infrastructure | ||
sudo: false | ||
|
||
# Install ansible | ||
addons: | ||
apt: | ||
packages: | ||
- python-pip | ||
|
||
install: | ||
# Install ansible | ||
- pip install ansible | ||
|
||
# Check ansible version | ||
- ansible --version | ||
|
||
# Create ansible.cfg with correct roles_path | ||
- printf '[defaults]\nroles_path=../' >ansible.cfg | ||
|
||
script: | ||
# Basic role syntax check | ||
- ansible-playbook tests/test.yml -i tests/inventory --syntax-check | ||
|
||
notifications: | ||
webhooks: https://galaxy.ansible.com/api/v1/notifications/ |
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,10 @@ | ||
# Change Log | ||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](http://keepachangelog.com/) | ||
and this project adheres to [Semantic Versioning](http://semver.org/). | ||
|
||
|
||
## [1.0.0] | ||
### Changed | ||
- initial commit |
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 |
---|---|---|
@@ -1 +1,36 @@ | ||
# ansible-role-docker-compose | ||
# Ansible Role - Docker Compose | ||
|
||
[![Build Status](https://travis-ci.org/elnebuloso/ansible-role-docker-compose.svg?branch=master)](https://travis-ci.org/elnebuloso/ansible-role-docker-compose) | ||
|
||
## Requirements | ||
|
||
This role requires Ansible 2.0 or higher, and platform requirements are listed in the metadata file. | ||
|
||
## Supported Distributions | ||
|
||
- ubuntu14 | ||
- ubuntu16 | ||
|
||
## Role Variables | ||
|
||
- [`defaults/main.yml`](https://github.com/elnebuloso/ansible-role-docker-compose/blob/master/defaults/main.yml) | ||
|
||
## Example Playbook | ||
|
||
``` | ||
- hosts: localhost | ||
roles: | ||
- role: elnebuloso.docker-compose | ||
``` | ||
|
||
## Dependencies | ||
|
||
None. | ||
|
||
## License | ||
|
||
MIT | ||
|
||
## Author Information | ||
|
||
This role was created in 2016 by [elnebuloso](https://github.com/elnebuloso/) |
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 @@ | ||
1.0.0 |
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,2 @@ | ||
--- | ||
docker_compose_version: "1.17.1" |
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,16 @@ | ||
galaxy_info: | ||
author: elnebuloso | ||
description: docker compose | ||
license: license (MIT) | ||
|
||
min_ansible_version: 2.0 | ||
|
||
platforms: | ||
- name: Ubuntu | ||
versions: | ||
- trusty | ||
- xenial | ||
|
||
galaxy_tags: [] | ||
|
||
dependencies: [] |
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,44 @@ | ||
--- | ||
- name: "check for installed docker-compose binary" | ||
stat: path=/usr/local/bin/docker-compose | ||
register: docker_compose_check_bin | ||
changed_when: false | ||
|
||
- name: "check for installation" | ||
set_fact: docker_compose_installed_version="no version installed" | ||
changed_when: false | ||
|
||
- name: "check if docker-compose {{docker_compose_version}} is installed" | ||
command: docker-compose --version | ||
register: docker_compose_check_installed | ||
when: docker_compose_check_bin.stat.exists == true | ||
changed_when: false | ||
|
||
- name: "check docker-compose version" | ||
set_fact: docker_compose_installed_version="{{docker_compose_check_installed.stdout}}" | ||
when: docker_compose_check_installed.stdout is defined | ||
changed_when: false | ||
|
||
- name: "check docker-compose version" | ||
debug: | ||
msg: "{{docker_compose_installed_version}}" | ||
|
||
- name: "check kernel (system) for correct docker-compose installation" | ||
shell: echo $(uname -s) | ||
register: docker_compose_uname_kernel_system | ||
changed_when: false | ||
when: 'docker_compose_version not in docker_compose_installed_version' | ||
|
||
- name: "check kernel (machine) for correct docker-compose installation" | ||
shell: echo $(uname -m) | ||
register: docker_compose_uname_kernel_machine | ||
changed_when: false | ||
when: 'docker_compose_version not in docker_compose_installed_version' | ||
|
||
- name: "install docker-compose" | ||
get_url: | ||
url: "https://github.com/docker/compose/releases/download/{{docker_compose_version}}/docker-compose-{{docker_compose_uname_kernel_system.stdout}}-{{docker_compose_uname_kernel_machine.stdout}}" | ||
dest: /usr/local/bin/docker-compose | ||
mode: 0755 | ||
force: yes | ||
when: 'docker_compose_version not in docker_compose_installed_version' |
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 @@ | ||
localhost |
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,5 @@ | ||
--- | ||
- hosts: localhost | ||
remote_user: root | ||
roles: | ||
- role: ansible-role-docker-compose |