Trash + Redo

This commit is contained in:
Olivier 2023-09-25 10:32:21 +02:00
parent bddc049ff5
commit 1265f1cb06
3 changed files with 156 additions and 2 deletions

View File

@ -1,6 +1,6 @@
MIT License MIT License
Copyright (c) 2023 kraoc Copyright (c) 2023 zogg
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: 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:

132
README.md
View File

@ -1,2 +1,132 @@
# ansible # Ansible
Ansible _tests_ to learn its concepts.
## playbook/orochi.yml
* Deploy add common usefulls (_for me_) on a new **VM** (_conditional_)
* Update **Debian**'s _sources list_ with 'host release' version
* Update all packages and upgrade the full system
* Perform a clean installation of **Docker** (_following specifications at date_)
* Cleanup & remove unused packages
* Deploy _my_ base VM managment **tools**
* Run docker's **Hello World**! (_conditional_)
* Run docker's **Itzg** Minecraft Server (_conditional_)
* Deploy specified **Docker Stacks** _(docker-compose.yml, .env & all required by each stack)_
## Changelog
### 2023-09-25
* TDD
### 2023-09-24
* TDD
* docker-compose template: split single/multiple command(s) with a test _(await a better solution)_
* Add _some_ documentation
* Bugfixes _(founded when running stacks)_
### 2023-09-23
* TDD
* Bugfixes
* Rework on stacks folders organization
### 2023-09-19
* TDD
* Depot reinitialization due to error
* Bugfixes after empty vm deployment
### 2023-09-12
* TDD
* Rework, refacto, variabilization
* Factorize stack templates processing
* Add SystemD services
* Add users creation
* Add the ability to append notice header in docker-compose
* Add middleware option for traefik
* Stacks definition: jekyll, registry, ntfy, ipfs
### 2023-09-11
* TDD
* Add stack name override (and defaulting network name to it in this case in docker-compose template)
* Stacks definition: promtail, portainer-agent, monitoring-vm, portainer
### 2023-09-10
* TDD
* docker-compose template corrections
* Minor updates on already defined stacks
* Redesign of 'files' folder structure for each stack (conf/datas/template as services subfolders)
* Stacks definition: drawio, flame, hastebin
### 2023-09-09
* TDD
* Reorder readme's changelog
* Correct NTP setup (vs systemd-timesyncd)
* Update OS/Familly conditionnal tasks
* Adjust available stacks detection
* Add system services managment
* Rename template files
### 2023-09-08
* TDD
* Move Itzg from Orochi task to VM conditionnal stack
* Rework + Refacto
* Populate 'available.stacks'
* Debug & corrections to docker-compose template
* Stacks definition: adguardhome, adminer, aptcacherng, dl, homepage, itzg
* Add _jinja2.ext.do_ to **jinja2_extensions** in _ansible.cfg_
### 2023-09-07
* TDD
* Rework using roles
* Split vm from docker
* Enhancments for timezone, locale
* Add ntp, hosts
* Templating docker-compose.yml
* Templating stacks
* Stacks definition: dozzle, watchtower
### 2023-09-06
* TDD
* Refinements
* Refactoring
* Use of Vault
* Improve VM base deployment
### 2023-09-05
* TDD
* Rework as concept
* Refine folders
* Templating
* Add things to common
* Add Itzg Minecraft Server
### 2023-09-01
* TDD
* Depot reinitialization due to corruption
* Switch from organization to user
* Playbook factorisation & simplication
### 2023-08-31
* TDD
* Switched connection from _user/pass_ to _ssh key_
* Updated playbook to enrich _usefulls_
* Success to run the playbook :p
* Using vault for some files
### 2023-08-30
* First try to run playbok with failure :p

24
ansible.cfg Normal file
View File

@ -0,0 +1,24 @@
# 2023-09-19
[defaults]
home = /opt/ansible
inventory = ./inventory/zogg.yml
playbook_dir = ./playbook
roles_path = ./roles
vault_password_file = ./vault.txt
module_lang = fr_FR.UTF-8
remote_tmp = /tmp/ansible
transport = smart
gathering = smart
debug = False
jinja2_extensions = jinja2.ext.do
[privilege_escalation]
become = True
become_user = root
[ssh_connection]
pipelining = true
[diff]
always = false