Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9cfeef4bcc
|
||
|
|
19bfd18f73
|
||
|
|
f9b8a9b9ef
|
No files matched your search
@@ -1,4 +1,14 @@
|
||||
---
|
||||
- name: WireGuard Deployment
|
||||
hosts: wireguard
|
||||
gather_facts: true
|
||||
become: true
|
||||
|
||||
roles:
|
||||
- role: githubixx.ansible_role_wireguard
|
||||
when: applications.wireguard.enabled | bool
|
||||
tags: wireguard, apps
|
||||
|
||||
- name: Application Deployment
|
||||
hosts: servers
|
||||
gather_facts: true
|
||||
@@ -11,7 +21,11 @@
|
||||
tags: borgbackup, apps
|
||||
|
||||
- role: artis3n.tailscale.machine
|
||||
when: applications.tailscale.enabled | bool
|
||||
when: >-
|
||||
(applications.tailscale.enabled or
|
||||
applications.tailscale.state | default('latest') == 'absent') | bool
|
||||
vars:
|
||||
state: "{{ applications.tailscale.state | default('latest') }}"
|
||||
tags: tailscale, apps
|
||||
|
||||
- role: salt
|
||||
|
||||
@@ -5,6 +5,12 @@
|
||||
become: true
|
||||
|
||||
pre_tasks:
|
||||
- name: Configure Debian package repositories
|
||||
ansible.builtin.import_role:
|
||||
name: common
|
||||
tasks_from: repositories
|
||||
tags: system, updates, repositories
|
||||
|
||||
- name: Update apt cache and upgrade system
|
||||
ansible.builtin.apt:
|
||||
update_cache: true
|
||||
|
||||
@@ -41,6 +41,8 @@ applications:
|
||||
enabled: false
|
||||
tailscale:
|
||||
enabled: false
|
||||
wireguard:
|
||||
enabled: false
|
||||
salt:
|
||||
enabled: false
|
||||
coolify:
|
||||
|
||||
@@ -1,4 +1,11 @@
|
||||
---
|
||||
debian_apt_mirror: https://deb.debian.org/debian
|
||||
debian_apt_security_mirror: https://deb.debian.org/debian-security
|
||||
debian_apt_components:
|
||||
- main
|
||||
- contrib
|
||||
debian_apt_backports_enabled: false
|
||||
|
||||
# Install Brendan Gregg's PMC tools
|
||||
pmc_cloud_tools_enabled: false
|
||||
pmc_cloud_tools_repo: https://git.itqdev.xyz/Infrastructure/pmc-cloud-tools.git
|
||||
|
||||
@@ -4,6 +4,8 @@ collections:
|
||||
version: 2.1.0
|
||||
- name: community.general
|
||||
version: 11.4.0
|
||||
- name: ansible.utils
|
||||
version: 6.1.0
|
||||
- name: community.docker
|
||||
version: 4.8.1
|
||||
- name: artis3n.tailscale
|
||||
@@ -21,3 +23,6 @@ roles:
|
||||
version: 3.0.0
|
||||
- src: borgbase.ansible_role_borgbackup
|
||||
version: v1.1.3
|
||||
- src: https://github.com/githubixx/ansible-role-wireguard.git
|
||||
name: githubixx.ansible_role_wireguard
|
||||
version: 19.0.0
|
||||
@@ -0,0 +1,36 @@
|
||||
---
|
||||
- name: Verify the host is Debian
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- ansible_distribution == 'Debian'
|
||||
- ansible_distribution_release | length > 0
|
||||
fail_msg: Debian APT repository configuration requires a Debian host with a release codename.
|
||||
|
||||
- name: Check for legacy APT sources list
|
||||
ansible.builtin.stat:
|
||||
path: /etc/apt/sources.list
|
||||
register: common_debian_apt_legacy_sources
|
||||
|
||||
- name: Disable official Debian entries in legacy sources list
|
||||
ansible.builtin.replace:
|
||||
path: /etc/apt/sources.list
|
||||
regexp: '^((?:deb|deb-src)\s+(?:\[[^]]+\]\s+)?https?://(?:deb\.debian\.org/debian(?:-security)?|security\.debian\.org/debian-security|ftp\.debian\.org/debian(?:-security)?)\s+.*)$'
|
||||
replace: '# Managed in /etc/apt/sources.list.d/debian.sources: \1'
|
||||
backup: true
|
||||
when: common_debian_apt_legacy_sources.stat.exists
|
||||
register: common_debian_apt_legacy_changed
|
||||
|
||||
- name: Configure Debian APT sources
|
||||
ansible.builtin.template:
|
||||
src: debian.sources.j2
|
||||
dest: /etc/apt/sources.list.d/debian.sources
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0644'
|
||||
backup: true
|
||||
register: common_debian_apt_sources_changed
|
||||
|
||||
- name: Refresh APT cache when repositories change
|
||||
ansible.builtin.apt:
|
||||
update_cache: true
|
||||
when: common_debian_apt_legacy_changed.changed or common_debian_apt_sources_changed.changed
|
||||
@@ -0,0 +1,20 @@
|
||||
# Managed by Ansible
|
||||
Types: deb
|
||||
URIs: {{ debian_apt_mirror }}
|
||||
Suites: {{ ansible_distribution_release }} {{ ansible_distribution_release }}-updates
|
||||
Components: {{ debian_apt_components | join(' ') }}
|
||||
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
|
||||
|
||||
Types: deb
|
||||
URIs: {{ debian_apt_security_mirror }}
|
||||
Suites: {{ ansible_distribution_release }}-security
|
||||
Components: {{ debian_apt_components | join(' ') }}
|
||||
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
|
||||
{% if debian_apt_backports_enabled | bool %}
|
||||
|
||||
Types: deb
|
||||
URIs: {{ debian_apt_mirror }}
|
||||
Suites: {{ ansible_distribution_release }}-backports
|
||||
Components: {{ debian_apt_components | join(' ') }}
|
||||
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
|
||||
{% endif %}
|
||||
Reference in new issue
Block a user