Git initial commit

This commit is contained in:
Lars Hahn 2023-08-20 10:30:31 +02:00
commit ba75448a2c
7 changed files with 78 additions and 0 deletions

9
LICENSE Executable file
View File

@ -0,0 +1,9 @@
MIT License
Copyright (c) <year> <copyright holders>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

3
README.md Executable file
View File

@ -0,0 +1,3 @@
# cloud-docker
Ansible role to setup basic docker and docker compose.

7
defaults/main.yml Executable file
View File

@ -0,0 +1,7 @@
---
cloud_apps: /opt
cloud_storage: /opt/storage
cloud_stage: prod
cloud_update: false
docker_compose_version: 1.29.2

1
handlers/main.yml Executable file
View File

@ -0,0 +1 @@
---

16
meta/main.yml Executable file
View File

@ -0,0 +1,16 @@
---
galaxy_info:
role_name: docker
namespace: hahn-cloud
author: Lars Hahn
company: OpenDevChain
license: MIT
description: Role to setup docker.
min_ansible_version: 2.7
platforms:
- name: Debian
versions:
- 10
galaxy_tags:
- docker
dependencies: []

41
tasks/main.yml Executable file
View File

@ -0,0 +1,41 @@
---
# Basics
- name: install requirements for docker
apt:
update_cache: yes
state: "{% if cloud_update | bool %}latest{% else %}present{% endif %}"
install_recommends: yes
pkg:
- apt-transport-https
- ca-certificates
- gnupg2
- software-properties-common
- curl
# Docker
- name: install docker repository key
apt_key:
url: https://download.docker.com/linux/debian/gpg
state: present
- name: install docker repository
apt_repository:
repo: "deb [arch={{ ansible_kernel.split('-')[-1] }}] https://download.docker.com/linux/debian {{ ansible_distribution_release }} stable"
state: present
- name: install docker (docker-ce + docker-ce-cli)
apt:
update_cache: yes
state: "{% if cloud_update | bool %}latest{% else %}present{% endif %}"
install_recommends: yes
pkg:
- docker-ce
- docker-ce-cli
- python3-docker
# Docker Compose
- name: download latest docker
get_url:
url: "https://github.com/docker/compose/releases/download/{{ docker_compose_version }}/docker-compose-linux-{{ ansible_architecture }}"
dest: /usr/local/bin/docker-compose
mode: 0755

1
vars/main.yml Executable file
View File

@ -0,0 +1 @@
---