diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..1bc97d0 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 Tobias Reisinger + +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. diff --git a/modules/services/main.tf b/modules/services/main.tf index 02e0134..4dc070a 100644 --- a/modules/services/main.tf +++ b/modules/services/main.tf @@ -18,6 +18,5 @@ terraform { locals { services_auth = {for key, val in var.services : key => val if val.auth} services_database = {for key, val in var.services : key => val if val.database} - services_s3 = {for key, val in var.services : key => val if val.s3} services_mail = {for key, val in var.services : key => val if val.mail != null} } diff --git a/modules/services/variables.tf b/modules/services/variables.tf index ae59dff..c70a7d9 100644 --- a/modules/services/variables.tf +++ b/modules/services/variables.tf @@ -16,7 +16,6 @@ variable "services" { auth = bool auth_cert = optional(string) auth_redirects = optional(list(string)) - s3 = bool database = bool mail = optional(string) })) diff --git a/playbooks/roles/software/files/docker-daemon.json b/playbooks/roles/software/files/docker-daemon.json new file mode 100644 index 0000000..d9ccbed --- /dev/null +++ b/playbooks/roles/software/files/docker-daemon.json @@ -0,0 +1,8 @@ +{ + "ipv6": true, + "ip6tables": true, + "fixed-cidr-v6": "fd00:1720:170::/64", + "dns": [ + "172.17.0.1" + ] +} diff --git a/playbooks/roles/software/tasks/docker.yml b/playbooks/roles/software/tasks/docker.yml index ad0aea8..3e30bd7 100644 --- a/playbooks/roles/software/tasks/docker.yml +++ b/playbooks/roles/software/tasks/docker.yml @@ -43,6 +43,24 @@ append: true become: true +- name: Apply docker daemon config + ansible.builtin.copy: + src: docker-daemon.json + dest: /etc/docker/daemon.json + mode: "0400" + owner: root + group: root + become: true + register: docker_config_result + +- name: Restart docker service + ansible.builtin.systemd_service: + state: restarted + name: docker + become: true + when: docker_config_result.changed # noqa: no-handler TODO can we add a handler here? + - name: Create a network community.docker.docker_network: name: apps + enable_ipv6: true