Initial Commit

This commit is contained in:
2024-09-09 22:37:51 +10:00
commit 2d11850d3e
50 changed files with 2408 additions and 0 deletions

View File

@ -0,0 +1,2 @@
---
# defaults file for common

View File

@ -0,0 +1,52 @@
galaxy_info:
author: Matthew McKinnon
description: Portainer CE
company: support@comprofix.com
# If the issue tracker for your role is not on github, uncomment the
# next line and provide a value
# issue_tracker_url: http://example.com/issue/tracker
# Choose a valid license ID from https://spdx.org - some suggested licenses:
# - BSD-3-Clause (default)
# - MIT
# - GPL-2.0-or-later
# - GPL-3.0-only
# - Apache-2.0
# - CC-BY-4.0
license: license (GPL-2.0-or-later, MIT, etc)
min_ansible_version: 2.1
# If this a Container Enabled role, provide the minimum Ansible Container version.
# min_ansible_container_version:
#
# Provide a list of supported platforms, and for each platform a list of versions.
# If you don't wish to enumerate all versions for a particular platform, use 'all'.
# To view available platforms and versions (or releases), visit:
# https://galaxy.ansible.com/api/v1/platforms/
#
# platforms:
# - name: Fedora
# versions:
# - all
# - 25
# - name: SomePlatform
# versions:
# - all
# - 1.0
# - 7
# - 99.99
galaxy_tags: []
# List tags for your role here, one per line. A tag is a keyword that describes
# and categorizes the role. Users find roles by searching for tags. Be sure to
# remove the '[]' above, if you add tags to this list.
#
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
# Maximum 20 tags per role.
dependencies: []
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
# if you add dependencies to this list.

View File

@ -0,0 +1,29 @@
---
- name: Create directories
file:
path: "{{ item }}"
state: directory
with_items:
- "{{ data_folder }}/portainer"
- name: Create Portainer Container
docker_container:
name: portainer
image: portainer/portainer-ce:2.21.0
command: --admin-password "{{PORTAINER_ADMIN_PASSWORD}}"
restart_policy: unless-stopped
volumes:
- "{{ data_folder }}/portainer/data:/data"
- '/var/run/docker.sock:/var/run/docker.sock'
networks:
- name: proxy
labels:
traefik.enable: "true"
traefik.http.routers.portainer-secure.rule: "Host(`{{portainer_host}}`)"
traefik.http.routers.portainer-secure.entrypoints: "https"
traefik.http.routers.portainer-secure.tls: "true"
traefik.http.routers.portainer-secure.service: "portainer"
traefik.http.services.portainer.loadbalancer.server.port: "9443"
traefik.http.services.portainer.loadbalancer.server.scheme: "https"
register: container_portainer

View File

@ -0,0 +1,14 @@
$ANSIBLE_VAULT;1.1;AES256
66663364383263343838636561393437373730633165306539633566356166313664656166633537
6333663336336463613565666465663430303665323766300a393063366230643139363061633636
65303631383230396461303836386335306261613664393762393266636437333634663464353137
6563366664663331380a346534323264633738663063356565643137323964663964656137633363
33333264383830666637376337633432353732353630333134353638653234333730636166356164
33363433343432623762393834336637626562613633393963323963623661643862636362313930
37346233373231663762346633323634666436323364653136656630636462333638316632626435
30336433353961333334386134383032356633643261656639623237386439653739363133633836
65333065336464386164363037363766353066396163386561323338326439376138316131306636
65376230383666393762393938313535386131313134613033393936633139363366373065623033
33353733613439383366393864623130396231323433393732653966653132313262346538646334
63303831333465613962653661656237326364396465366234383663333431366233363133623936
62663632356361323930326230326565366366663733633137633938643564373766