Add ansible vault and jinja templates (#10)
parent
d80c451f19
commit
f271baa7d8
@ -1,4 +1,3 @@
|
||||
.idea
|
||||
secrets.yml
|
||||
venv
|
||||
stack.env
|
||||
|
||||
@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
# fetch vault password from bitwarden. We assume there is an item called "homelab-vault" that contains the password
|
||||
password="$(bw list items | jq -r 'map(select(.name == "homelab-vault"))[0].login.password')"
|
||||
echo "${password}"
|
||||
@ -1,3 +1,4 @@
|
||||
[defaults]
|
||||
default_module_path=library
|
||||
inventory=hosts.ini
|
||||
vault_password_file=.vault-pass
|
||||
|
||||
@ -1,29 +0,0 @@
|
||||
---
|
||||
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/
|
||||
@ -1,33 +0,0 @@
|
||||
---
|
||||
# Based on ansible-lint config
|
||||
extends: default
|
||||
|
||||
rules:
|
||||
braces:
|
||||
max-spaces-inside: 1
|
||||
level: error
|
||||
brackets:
|
||||
max-spaces-inside: 1
|
||||
level: error
|
||||
colons:
|
||||
max-spaces-after: -1
|
||||
level: error
|
||||
commas:
|
||||
max-spaces-after: -1
|
||||
level: error
|
||||
comments: disable
|
||||
comments-indentation: disable
|
||||
document-start: disable
|
||||
empty-lines:
|
||||
max: 3
|
||||
level: error
|
||||
hyphens:
|
||||
level: error
|
||||
indentation: disable
|
||||
key-duplicates: enable
|
||||
line-length: disable
|
||||
new-line-at-end-of-file: disable
|
||||
new-lines:
|
||||
type: unix
|
||||
trailing-spaces: disable
|
||||
truthy: disable
|
||||
@ -1,38 +0,0 @@
|
||||
Role Name
|
||||
=========
|
||||
|
||||
A brief description of the role goes here.
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.
|
||||
|
||||
Role Variables
|
||||
--------------
|
||||
|
||||
A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
|
||||
A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.
|
||||
|
||||
Example Playbook
|
||||
----------------
|
||||
|
||||
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
|
||||
|
||||
- hosts: servers
|
||||
roles:
|
||||
- { role: username.rolename, x: 42 }
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
BSD
|
||||
|
||||
Author Information
|
||||
------------------
|
||||
|
||||
An optional section for the role authors to include contact information, or a website (HTML is not allowed).
|
||||
@ -1 +0,0 @@
|
||||
---
|
||||
@ -1,2 +0,0 @@
|
||||
---
|
||||
# handlers file for setup_docker
|
||||
@ -1,7 +0,0 @@
|
||||
---
|
||||
- name: Converge
|
||||
hosts: all
|
||||
tasks:
|
||||
- name: "Include chatton.setup_docker"
|
||||
include_role:
|
||||
name: "chatton.setup_docker"
|
||||
@ -1,29 +0,0 @@
|
||||
---
|
||||
dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
platforms:
|
||||
- name: instance
|
||||
image: geerlingguy/docker-debian10-ansible:latest
|
||||
privileged: true
|
||||
pre_build_image: true
|
||||
provisioner:
|
||||
name: ansible
|
||||
verifier:
|
||||
name: ansible
|
||||
scenario:
|
||||
test_sequence:
|
||||
# - dependency
|
||||
# - lint
|
||||
# - cleanup
|
||||
- destroy
|
||||
- syntax
|
||||
- create
|
||||
# - prepare
|
||||
- converge
|
||||
- idempotence
|
||||
# - side_effect
|
||||
- verify
|
||||
# - cleanup
|
||||
- destroy
|
||||
@ -1,10 +0,0 @@
|
||||
---
|
||||
# This is an example playbook to execute Ansible tests.
|
||||
|
||||
- name: Verify
|
||||
hosts: all
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- name: Example assertion
|
||||
ansible.builtin.assert:
|
||||
that: true
|
||||
@ -1,2 +0,0 @@
|
||||
localhost
|
||||
|
||||
@ -1,5 +0,0 @@
|
||||
---
|
||||
- hosts: localhost
|
||||
remote_user: root
|
||||
roles:
|
||||
- setup_docker
|
||||
@ -1,2 +0,0 @@
|
||||
---
|
||||
# vars file for setup_docker
|
||||
@ -0,0 +1,31 @@
|
||||
$ANSIBLE_VAULT;1.1;AES256
|
||||
61663635393234373338643564313337353832313533656466623266303965326333353663353336
|
||||
3431663531363464626562383135393830353339323764370a303031353864633834346539363832
|
||||
33313832616138386365353966333137363937663736306261346136646565653936646332626135
|
||||
3538356635613735380a666336356139656466306432636466653630633762323133333936353133
|
||||
31616437663332653134363630363961303132653064666436383864613835353437336637353265
|
||||
63653963306338363730346139383636643033353835346134363231326264666461303134353432
|
||||
62396237316261383061383566616433303833613561383638663361363963326463656461346537
|
||||
62383761386266316664666432316664646562316565333330373264373535393035303466613536
|
||||
61633565663237373734653062333564653964366234333035393937613139313930363936323963
|
||||
31623166313564616362303230386466653831393438616166353666653536393231613565656461
|
||||
35313239363563323434626561336363353137643361376437363736613263303738333462323538
|
||||
32343230663033646437343937613633623663333339313037393661313938346232346535663935
|
||||
30663631326431663838356131346530643930663633306233633135646665313264633436336665
|
||||
63626532343763633936313264613836353437356233396161616362323837376166313438353131
|
||||
62613064393362616430313935646662316239333332393036303766373837343338623036316539
|
||||
34643639666237356536666562376664376637643430663930353337623037373133663961633961
|
||||
38623863626265363661333132656662613337613939656365353734326463373833323332323463
|
||||
35356334326239313661626462376666626435313565306366333062393433323734326563616261
|
||||
65646130626234333039646136646463393365643833306562343165613766636133373463333465
|
||||
38316538383964343164323238356461643632346365646536356265353933336466613838623335
|
||||
34663630633062346562653964613831333165386538353636313565343536666465366438303136
|
||||
65663336303239636239626662323730383834376436636562333164396631323035333862393832
|
||||
63646364343564383235376137303031653163393966656264646338366163633931613437393830
|
||||
33643935353965393661323837646437306364396633636335346361316339326432306363376432
|
||||
66333637336636396536656237623232326539326264363033393334616235626463623435373763
|
||||
65396162336430336666373233636138363666613235323565336334353231613263383564633663
|
||||
35653433383936623638393032363935666134323833306563393266663933653261383061303036
|
||||
37393065643766643336616465663631316130653365366666613333363638663631303363636431
|
||||
34333435616435386261383865356166396666633737613763303165396365616635346534616131
|
||||
3437323335316432396363353138333163613830623165666666
|
||||
@ -1,7 +0,0 @@
|
||||
---
|
||||
- name: Converge
|
||||
hosts: all
|
||||
tasks:
|
||||
- name: "Include chatton.setup_hosted_services"
|
||||
include_role:
|
||||
name: "chatton.setup_hosted_services"
|
||||
@ -1,29 +0,0 @@
|
||||
---
|
||||
dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
platforms:
|
||||
- name: instance
|
||||
image: geerlingguy/docker-debian10-ansible:latest
|
||||
privileged: true
|
||||
pre_build_image: true
|
||||
provisioner:
|
||||
name: ansible
|
||||
verifier:
|
||||
name: ansible
|
||||
scenario:
|
||||
test_sequence:
|
||||
# - dependency
|
||||
# - lint
|
||||
# - cleanup
|
||||
- destroy
|
||||
- syntax
|
||||
- create
|
||||
# - prepare
|
||||
- converge
|
||||
- idempotence
|
||||
# - side_effect
|
||||
- verify
|
||||
# - cleanup
|
||||
- destroy
|
||||
@ -1,10 +0,0 @@
|
||||
---
|
||||
# This is an example playbook to execute Ansible tests.
|
||||
|
||||
- name: Verify
|
||||
hosts: all
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- name: Example assertion
|
||||
ansible.builtin.assert:
|
||||
that: true
|
||||
@ -1,3 +1,4 @@
|
||||
---
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
@ -1,3 +1,4 @@
|
||||
---
|
||||
version: '3'
|
||||
services:
|
||||
linkding:
|
||||
@ -1,3 +1,4 @@
|
||||
---
|
||||
version: "3"
|
||||
services:
|
||||
nginx-proxy-manager:
|
||||
@ -1,3 +1,4 @@
|
||||
---
|
||||
version: "3.8"
|
||||
services:
|
||||
olivetin:
|
||||
@ -1,3 +1,4 @@
|
||||
---
|
||||
version: "3"
|
||||
services:
|
||||
overseerr:
|
||||
@ -1,5 +1,5 @@
|
||||
---
|
||||
version: '3.3'
|
||||
|
||||
services:
|
||||
uptime-kuma:
|
||||
labels:
|
||||
@ -1,2 +0,0 @@
|
||||
localhost
|
||||
|
||||
@ -1,5 +0,0 @@
|
||||
---
|
||||
- hosts: localhost
|
||||
remote_user: root
|
||||
roles:
|
||||
- setup_hosted_services
|
||||
@ -1,2 +1,2 @@
|
||||
---
|
||||
# vars file for setup_hosted_services
|
||||
# vars file for setup_hosted_services
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,7 +0,0 @@
|
||||
---
|
||||
- name: Converge
|
||||
hosts: all
|
||||
tasks:
|
||||
- name: "Include chatton.setup_portainer"
|
||||
include_role:
|
||||
name: "chatton.setup_portainer"
|
||||
@ -1,29 +0,0 @@
|
||||
---
|
||||
dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
platforms:
|
||||
- name: instance
|
||||
image: geerlingguy/docker-debian10-ansible:latest
|
||||
privileged: true
|
||||
pre_build_image: true
|
||||
provisioner:
|
||||
name: ansible
|
||||
verifier:
|
||||
name: ansible
|
||||
scenario:
|
||||
test_sequence:
|
||||
# - dependency
|
||||
# - lint
|
||||
# - cleanup
|
||||
- destroy
|
||||
- syntax
|
||||
- create
|
||||
# - prepare
|
||||
- converge
|
||||
- idempotence
|
||||
# - side_effect
|
||||
- verify
|
||||
# - cleanup
|
||||
- destroy
|
||||
@ -1,10 +0,0 @@
|
||||
---
|
||||
# This is an example playbook to execute Ansible tests.
|
||||
|
||||
- name: Verify
|
||||
hosts: all
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- name: Example assertion
|
||||
ansible.builtin.assert:
|
||||
that: true
|
||||
@ -1,4 +0,0 @@
|
||||
portainer:
|
||||
password: ""
|
||||
aws_s3_secrets:
|
||||
aws_secret_key: ""
|
||||
@ -0,0 +1,8 @@
|
||||
portainer:
|
||||
password: ""
|
||||
aws_s3:
|
||||
s3_url: ""
|
||||
aws_access_key: ""
|
||||
region: ""
|
||||
bucket: ""
|
||||
aws_secret_key: ""
|
||||
@ -0,0 +1,18 @@
|
||||
$ANSIBLE_VAULT;1.1;AES256
|
||||
61363762386463363239383863386334663239316431656632363337383662393836666161383866
|
||||
6632613662396362326535343637653038303132346236660a646133323461333133623663363936
|
||||
66303762383261386437653030343465336463383561623661623837316337303032323364303763
|
||||
3836333231663065390a363833626265636665333431616364613736366339633231346630663664
|
||||
65313366366532363266373530623938366435303734356139303635393731623866343733663864
|
||||
34306363313964393965303632366265376136343964626562653866633233333762366132336663
|
||||
34343962363263373662626534396535356533323931316535303366346233306565353032643636
|
||||
35653135663936636632656535306562636461366133343963666462396364613434356439313364
|
||||
37376565646232346634313166306263653361633136383061353831383061376335323330366431
|
||||
38623938633236326539633334303835343662373461313738333531653763623835383431343332
|
||||
64613362396138643036643762643030636332663632376438393664623434646562396431333166
|
||||
63636132346565323434663063366631373162623863343564326465613936663533303135383637
|
||||
65366531316630353565396537656561643162616339616439666662316437366165393361363432
|
||||
37633137643837656238613738666634663162636532336530636231363135383965323833323333
|
||||
39306165356564633032333135383366356163343530393833373666636134386166653333613161
|
||||
36383039346531643134396432643738623862353338363737343134353033663636353762353561
|
||||
3936
|
||||
Loading…
Reference in New Issue