Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
2b747f5
fix: CTF Makefile audit — resolve 3 critical, 4 high, 8 medium findin…
t0kubetsu May 11, 2026
9b3d132
feat(topology): add 05_topology_layer templates for r42topo
w1ld3r Jun 3, 2026
b88b2ed
feat(topology): add os field to box templates + debian-jump example
w1ld3r Jun 3, 2026
af5aeb3
refactor(topology): box_template os -> image (versioned <distro>_<cod…
w1ld3r Jun 3, 2026
c06e887
feat(vuln-box): firewall_rules + docker stack as attachment params
w1ld3r Jun 3, 2026
b12f73e
feat(box-templates): carry firewall_rules as attachment params on eve…
w1ld3r Jun 3, 2026
e75cb2a
feat(image-layer): add 01_image_layer with ubuntu_noble and debian_tr…
t0kubetsu Jun 4, 2026
8d10006
feat(image-layer): add cloud_image download specs to ubuntu_noble and…
t0kubetsu Jun 4, 2026
c9194a8
feat(image-layer): add proxmox_templates to ubuntu_noble (12 VMs) and…
t0kubetsu Jun 4, 2026
1d6b09b
refactor(catalog): template_vm + ip_octet + template_subnet + vm_name…
t0kubetsu Jun 4, 2026
35c93d3
feat(roles): extend debian-based support — rename ubuntu/ → debian-ba…
t0kubetsu Jun 4, 2026
de2ae09
refactor(topology): remove role from box templates, add subnet metada…
t0kubetsu Jun 4, 2026
516f8c0
refactor(topology): remove default_inventory_group from box templates
t0kubetsu Jun 4, 2026
c599382
refactor(layout): remove base_octet from subnet definitions
t0kubetsu Jun 4, 2026
782eca7
refactor(layout): compute section/label from subnet position, add dua…
t0kubetsu Jun 4, 2026
4a2d4ee
feat(catalog): add dual-lan-isolate network policy
t0kubetsu Jun 4, 2026
e6d9165
fix(policy): dual-lan-isolate: default_action accept
t0kubetsu Jun 4, 2026
f762376
fix(policy): dual-lan-isolate: deny-by-default + explicit egress
t0kubetsu Jun 4, 2026
578f37a
chore: ignore CLAUDE.md and .claude/ session dirs
t0kubetsu Jun 5, 2026
214f16b
feat(apt-mirror): add apt-cacher-ng box template and Ansible roles
t0kubetsu Jun 8, 2026
6ba7a43
feat(apt-mirror): add dual-mode apt server — proxy-cache + airgapped …
t0kubetsu Jun 8, 2026
96e236b
feat(apt-mirror): add apt-mirror-airgapped box template (full offline…
t0kubetsu Jun 8, 2026
54529df
refactor(apt-cache): rename apt-mirror box template to apt-cache
t0kubetsu Jun 8, 2026
aafb90f
refactor(apt-mirror): rename apt-mirror-airgapped to apt-mirror — air…
t0kubetsu Jun 8, 2026
6ab16fe
feat(image): add template-vm-debian-trixie-large (2cpu/8gb/500gb) for…
t0kubetsu Jun 8, 2026
f5b99c1
refactor(apt-mirror): split server role into software.install.apt_cac…
t0kubetsu Jun 8, 2026
5b34ccd
feat(apt-mirror): expose tuneable params in box template
t0kubetsu Jun 8, 2026
d0c8fd8
docs(apt-mirror): expose all role params in box template
t0kubetsu Jun 8, 2026
e1d2bf0
docs(apt-mirror): generic description
t0kubetsu Jun 8, 2026
9d05214
feat(image,apt-mirror): remove ip_octet; rename suite vars to codenam…
t0kubetsu Jun 8, 2026
c69a16b
fix(catalog): default apt_mirror_prewarm to true in apt-mirror box te…
t0kubetsu Jun 8, 2026
f10e2a8
fix(apt_mirror_client): wait for mirror Release file before apt update
t0kubetsu Jun 8, 2026
1bdd03b
fix(apt_mirror_client): strip unmirrored backports suite in airgapped…
t0kubetsu Jun 8, 2026
68e4367
fix(apt-mirror): remove hardcoded suite flags, document auto-detection
t0kubetsu Jun 8, 2026
8708a57
fix(apt_mirror): default apt_mirror_debian_trixie to false
t0kubetsu Jun 8, 2026
6c3bf5d
fix(apt-mirror-client): strip backports from Ubuntu sources when not …
t0kubetsu Jun 8, 2026
7b9018c
fix(apt-mirror): add universe component and strip non-mirrored compon…
t0kubetsu Jun 8, 2026
329d074
fix(apt_mirror_client): wait for universe/Packages not InRelease on U…
t0kubetsu Jun 8, 2026
cfb0fa3
fix(image): update debian-trixie-large spec to 4cpu/16gb/500gb
t0kubetsu Jun 8, 2026
9a22979
fix(apt-mirror): increase wait retries from 60 to 360 for airgapped p…
t0kubetsu Jun 9, 2026
b62bf82
chore(ci): add CI workflow and Dependabot hardening
t0kubetsu Jun 9, 2026
a99ffda
fix(ci): relax ansible-lint profile, add .ansible-lint config
t0kubetsu Jun 9, 2026
d5eccaf
fix(ci): expand ansible-lint skip/warn lists to cover all pre-existin…
t0kubetsu Jun 9, 2026
4fdc1dd
fix(ci): remove unskippable syntax-check entries from skip_list
t0kubetsu Jun 9, 2026
b16b6ae
fix(ci): skip command-instead-of-shell/no-free-form/jinja[spacing] + …
t0kubetsu Jun 9, 2026
bd5cac2
ci(workflow): fix push branch triggers — feat/** + fix/** replace fea…
t0kubetsu Jun 9, 2026
471a043
fix(ansible): replace curl shell calls with get_url module
t0kubetsu Jun 9, 2026
a366f72
fix(ci): update outdated noqa numeric tags to named format
t0kubetsu Jun 9, 2026
0698dd6
fix(ci): fix schema[meta] float versions and add ansible.windows coll…
t0kubetsu Jun 9, 2026
a9677dc
fix(ci): remove abandoned trashed/ dir and add mock role stubs
t0kubetsu Jun 9, 2026
8a14e50
merge: PR #154 (fix/ctf-makefiles-audit) into dev_ada
t0kubetsu Jun 10, 2026
66ebbb8
merge: PR #180 (feat/topology-layer-templates) into dev_ada
t0kubetsu Jun 10, 2026
d6b904e
merge: PR #181 (feat/local-apt-mirror) into dev_ada
t0kubetsu Jun 10, 2026
f67cf3b
merge: PR #183 (feat/ci-hardening) into dev_ada
t0kubetsu Jun 10, 2026
de7bc37
merge: PR #188 (feat/admin-docker-elements) into dev_ada
t0kubetsu Jun 10, 2026
13cff04
feat(topology): add admin-rocketchat box template + bootstrap role
t0kubetsu Jun 10, 2026
aa9b953
merge: PR #189 (feature/rocketchat-bootstrap) into dev_ada
t0kubetsu Jun 10, 2026
e86f4f9
fix(topology): admin-rocketchat — drop NTP-and-update-time from basic…
t0kubetsu Jun 10, 2026
bc15124
merge: fix/rocketchat-box-no-ntp into dev_ada
t0kubetsu Jun 10, 2026
8382467
fix(basic_packages): drop software-properties-common from Debian dock…
t0kubetsu Jun 10, 2026
bb6c5b6
merge: fix/docker-debian-no-software-properties into dev_ada
t0kubetsu Jun 10, 2026
87e7435
fix(basic_packages): use keyring instead of removed apt-key for docke…
t0kubetsu Jun 10, 2026
90f4f0b
merge: fix/docker-debian-apt-key-deprecated into dev_ada
t0kubetsu Jun 10, 2026
d186dd3
fix(basic_packages): install docker compose v2 plugin + SDK (Debian c…
t0kubetsu Jun 10, 2026
31b25fb
merge: fix/docker-compose-v2-plugin into dev_ada
t0kubetsu Jun 10, 2026
f46c709
fix(rocketchat): bump MongoDB 6.0 -> 8.0 (rocket.chat:latest now requ…
t0kubetsu Jun 10, 2026
d46e667
merge: fix/rocketchat-mongo8 into dev_ada
t0kubetsu Jun 10, 2026
421a423
fix(docker-compose): retry compose up on transient registry/mirror ti…
t0kubetsu Jun 10, 2026
fbde40e
merge: fix/docker-compose-run-retry into dev_ada
t0kubetsu Jun 10, 2026
6ed19b0
fix(rocketchat): healthcheck + provisioner don't depend on curl (abse…
t0kubetsu Jun 10, 2026
e003642
merge: fix/rocketchat-healthcheck-curl into dev_ada
t0kubetsu Jun 10, 2026
df89eb8
fix(rocketchat): use /health + /api/info — /api/v1/info is 404 on RC 8.x
t0kubetsu Jun 10, 2026
3cc280d
merge: fix/rocketchat-health-endpoint into dev_ada
t0kubetsu Jun 10, 2026
a393242
feat(nextcloud): add software.install.nextcloud role, admin-nextcloud…
t0kubetsu Jun 11, 2026
1d91b31
Merge branch 'dev_ada' into feature/nextcloud-bootstrap
t0kubetsu Jun 11, 2026
9573b18
merge: feature/nextcloud-bootstrap into dev_ada
t0kubetsu Jun 11, 2026
2198f36
feat(mattermost): add software.install.mattermost role, admin-matterm…
t0kubetsu Jun 11, 2026
3953af1
merge: dev_ada into feature/mattermost-bootstrap
t0kubetsu Jun 11, 2026
734f777
fix(mattermost): pin provisioner runtime to 10.9.5, copy sh, fix ENTR…
t0kubetsu Jun 11, 2026
9dd3c7a
fix(mattermost): copy busybox binary not symlink for /bin/sh in runti…
t0kubetsu Jun 11, 2026
b96abf9
fix(mattermost): runtime is Debian not Alpine; use native /usr/bin/sh
t0kubetsu Jun 11, 2026
14c7a6c
fix(mattermost): restore jq as static binary; download from jqlang re…
t0kubetsu Jun 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
profile: basic

skip_list:
# SCREAMING_SNAKE is the documented convention for infrastructure-wide vars
- var-naming[pattern]
# dot-notation role naming is the documented convention (e.g. software.install.wazuh)
- role-name
# dot-notation roles produce nonsensical prefix requirements
- var-naming[no-role-prefix]
# pre-existing task naming convention: lowercase names throughout catalog
- name[casing]
# large legacy codebase: hundreds of unnamed tasks, out of scope for CI hardening
- name[missing]
# plays in catalog bundles do not require names
- name[play]
# Jinja template syntax in task names is intentional
- name[template]
# cosmetic key ordering; pre-existing throughout catalog
- key-order[task]
# partial become (become without become_user) is pre-existing throughout catalog
- partial-become[task]
# octal file permission values are intentional (e.g. 0644, 0755)
- yaml[octal-values]
# pre-existing shell usage throughout catalog — all cases are intentional
- command-instead-of-shell
# pre-existing free-form module calls throughout catalog
- no-free-form
# pre-existing {{ var}} spacing in catalog roles — cosmetic only
- jinja[spacing]

warn_list:
- yaml[line-length]
- yaml[truthy]
- yaml[trailing-spaces]
- yaml[empty-lines]
- yaml[new-line-at-end-of-file]
- yaml[colons]
- yaml[comments]
- yaml[indentation]
- risky-shell-pipe

# catalog roles that reference themselves in test.yml or cross-repo roles not checked out in CI
mock_roles:
- soft.install.warmup.local_bin
- software.install.dotFiles
- system.checks.overview
1 change: 1 addition & 0 deletions .ansible/roles/software.install.dotFiles/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
---
1 change: 1 addition & 0 deletions .ansible/roles/system.checks.overview/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
---
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
labels: [dependencies, ci]
17 changes: 17 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: CI
on:
push:
branches: [main, dev, 'feat/**', 'fix/**']
pull_request:
branches: [main, dev]
jobs:
ansible-lint:
name: Ansible Lint
runs-on: ubuntu-latest
container:
image: python:3.13-slim
steps:
- run: apt-get update && apt-get install -y --no-install-recommends git
- uses: actions/checkout@v4
- run: pip install --no-cache-dir ansible-lint
- run: ansible-lint 02_ansible_layer/
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
notes
CLAUDE.md
**/CLAUDE.md
.claude/
**/.env
!**/.env.example
12 changes: 12 additions & 0 deletions 01_image_layer/debian_trixie/v1.0.0/image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
id: debian_trixie
api_version: 1
distro: debian
codename: trixie
description: Debian 13 (Trixie)
cloud_image:
url: "https://cloud.debian.org/images/cloud/trixie/latest/debian-13-genericcloud-amd64.raw"
filename: "debian-13-genericcloud-amd64.img"
proxmox_templates:
- {vm_id: 9321, vm_name: "template-vm-debian-trixie-small", spec: "1cpu/4gb/32gb"}
- {vm_id: 9331, vm_name: "template-vm-debian-trixie-medium", spec: "2cpu/8gb/64gb"}
- {vm_id: 9341, vm_name: "template-vm-debian-trixie-large", spec: "4cpu/16gb/500gb"}
21 changes: 21 additions & 0 deletions 01_image_layer/ubuntu_noble/v1.0.0/image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
id: ubuntu_noble
api_version: 1
distro: ubuntu
codename: noble
description: Ubuntu 24.04 LTS (Noble Numbat)
cloud_image:
url: "https://cloud-images.ubuntu.com/minimal/daily/noble/current/noble-minimal-cloudimg-amd64.img"
filename: "noble-minimal-cloudimg-amd64.img"
proxmox_templates:
- {vm_id: 9901, vm_name: "template-vm-ubuntu-noble-nano", spec: "1cpu/1gb/16gb"}
- {vm_id: 9211, vm_name: "template-vm-ubuntu-noble-micro-01-2g-24g", spec: "1cpu/2gb/24gb"}
- {vm_id: 9212, vm_name: "template-vm-ubuntu-noble-micro-02-2g-24g", spec: "1cpu/2gb/24gb"}
- {vm_id: 9221, vm_name: "template-vm-ubuntu-noble-small-01-4g-32g", spec: "1cpu/4gb/32gb"}
- {vm_id: 9222, vm_name: "template-vm-ubuntu-noble-small-02-4g-32g", spec: "1cpu/4gb/32gb"}
- {vm_id: 9224, vm_name: "template-vm-ubuntu-noble-small-04-4g-32g", spec: "1cpu/4gb/32gb"}
- {vm_id: 9232, vm_name: "template-vm-ubuntu-noble-medium-02-8g-64g", spec: "2cpu/8gb/64gb"}
- {vm_id: 9234, vm_name: "template-vm-ubuntu-noble-medium-04-8g-64g", spec: "4cpu/8gb/64gb"}
- {vm_id: 9236, vm_name: "template-vm-ubuntu-noble-medium-06-8g-64g", spec: "6cpu/8gb/64gb"}
- {vm_id: 9244, vm_name: "template-vm-ubuntu-noble-large-04-8g-64g", spec: "4cpu/8gb/64gb"}
- {vm_id: 9246, vm_name: "template-vm-ubuntu-noble-large-06-8g-64g", spec: "6cpu/8gb/64gb"}
- {vm_id: 9248, vm_name: "template-vm-ubuntu-noble-large-08-8g-64g", spec: "8cpu/8gb/64gb"}
21 changes: 21 additions & 0 deletions 01_image_layer/ubuntu_resolute/v1.0.0/image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
id: ubuntu_resolute
api_version: 1
distro: ubuntu
codename: resolute
description: Ubuntu 26.04 LTS (Resolute Raccoon)
cloud_image:
url: "https://cloud-images.ubuntu.com/minimal/daily/resolute/current/resolute-minimal-cloudimg-amd64.img"
filename: "resolute-minimal-cloudimg-amd64.img"
proxmox_templates:
- {vm_id: 9501, vm_name: "template-vm-ubuntu-resolute-nano", spec: "1cpu/1gb/16gb"}
- {vm_id: 9511, vm_name: "template-vm-ubuntu-resolute-micro-01-2g-24g", spec: "1cpu/2gb/24gb"}
- {vm_id: 9512, vm_name: "template-vm-ubuntu-resolute-micro-02-2g-24g", spec: "1cpu/2gb/24gb"}
- {vm_id: 9521, vm_name: "template-vm-ubuntu-resolute-small-01-4g-32g", spec: "1cpu/4gb/32gb"}
- {vm_id: 9522, vm_name: "template-vm-ubuntu-resolute-small-02-4g-32g", spec: "1cpu/4gb/32gb"}
- {vm_id: 9524, vm_name: "template-vm-ubuntu-resolute-small-04-4g-32g", spec: "1cpu/4gb/32gb"}
- {vm_id: 9532, vm_name: "template-vm-ubuntu-resolute-medium-02-8g-64g", spec: "2cpu/8gb/64gb"}
- {vm_id: 9534, vm_name: "template-vm-ubuntu-resolute-medium-04-8g-64g", spec: "4cpu/8gb/64gb"}
- {vm_id: 9536, vm_name: "template-vm-ubuntu-resolute-medium-06-8g-64g", spec: "6cpu/8gb/64gb"}
- {vm_id: 9544, vm_name: "template-vm-ubuntu-resolute-large-04-8g-64g", spec: "4cpu/8gb/64gb"}
- {vm_id: 9546, vm_name: "template-vm-ubuntu-resolute-large-06-8g-64g", spec: "6cpu/8gb/64gb"}
- {vm_id: 9548, vm_name: "template-vm-ubuntu-resolute-large-08-8g-64g", spec: "8cpu/8gb/64gb"}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
# defaults file
apt_mirror_enabled: false
apt_proxy_url: ""
apt_mirror_airgapped: false
apt_mirror_vm_ip: ""
apt_mirror_http_port: 80
# Wait parameters — used only in airgapped (mirror) mode.
# apt-mirror prewarm runs async on the server; clients poll until the Release
# file is accessible before proceeding with apt update.
apt_mirror_wait_retries: 360
apt_mirror_wait_delay: 30
# Set to true only if backports are included in the mirror (apt_mirror_backports: true on server).
# When false (default), the backports suite is stripped from apt sources in airgapped mode.
apt_mirror_backports: false
# Must match apt_mirror_ubuntu_components on the mirror server.
# The client strips any components not listed here from ubuntu.sources in airgapped mode.
apt_mirror_ubuntu_components: "main restricted universe"
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
# handlers file

- name: update apt cache
ansible.builtin.apt:
update_cache: true
become: true
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
---
# tasks file

- name: client - assert apt_mirror_vm_ip is set in airgapped mode
ansible.builtin.assert:
that: apt_mirror_vm_ip | length > 0
fail_msg: "apt_mirror_vm_ip must be set when apt_mirror_airgapped is true"
when:
- apt_mirror_enabled | default(false) | bool
- apt_mirror_airgapped | default(false) | bool

- name: client - set effective mirror URL (airgapped)
ansible.builtin.set_fact:
_apt_effective_url: "http://{{ apt_mirror_vm_ip }}:{{ apt_mirror_http_port }}"
when:
- apt_mirror_enabled | default(false) | bool
- apt_mirror_airgapped | default(false) | bool

- name: client - set effective mirror URL (proxy)
ansible.builtin.set_fact:
_apt_effective_url: "{{ apt_proxy_url }}"
when:
- apt_mirror_enabled | default(false) | bool
- not apt_mirror_airgapped | default(false) | bool

- name: client - wait for mirror Release file to be accessible
ansible.builtin.uri:
url: >-
{%- if ansible_distribution == 'Debian' -%}
{{ _apt_effective_url }}/deb.debian.org/debian/dists/{{ ansible_distribution_release }}/InRelease
{%- elif 'universe' in apt_mirror_ubuntu_components -%}
{{ _apt_effective_url }}/archive.ubuntu.com/ubuntu/dists/{{ ansible_distribution_release }}/universe/binary-amd64/Packages
{%- else -%}
{{ _apt_effective_url }}/archive.ubuntu.com/ubuntu/dists/{{ ansible_distribution_release }}/InRelease
{%- endif -%}
method: GET
status_code: 200
timeout: 10
register: _apt_mirror_release_check
until: _apt_mirror_release_check.status == 200
retries: "{{ apt_mirror_wait_retries }}"
delay: "{{ apt_mirror_wait_delay }}"
when:
- apt_mirror_enabled | default(false) | bool
- apt_mirror_airgapped | default(false) | bool
- _apt_effective_url is defined
- ansible_distribution in ["Debian", "Ubuntu"]

- name: client - remove backports suite from apt sources (not mirrored)
ansible.builtin.replace:
path: /etc/apt/sources.list.d/debian.sources
regexp: '(Suites:.*)[ \t]+{{ ansible_distribution_release }}-backports'
replace: '\1'
become: true
when:
- apt_mirror_enabled | default(false) | bool
- apt_mirror_airgapped | default(false) | bool
- not apt_mirror_backports | default(false) | bool
- ansible_distribution == "Debian"

- name: client - remove backports suite from ubuntu apt sources (not mirrored)
ansible.builtin.replace:
path: /etc/apt/sources.list.d/ubuntu.sources
regexp: '(Suites:.*)[ \t]+{{ ansible_distribution_release }}-backports'
replace: '\1'
become: true
when:
- apt_mirror_enabled | default(false) | bool
- apt_mirror_airgapped | default(false) | bool
- not apt_mirror_backports | default(false) | bool
- ansible_distribution == "Ubuntu"

- name: client - restrict ubuntu apt components to mirrored set
ansible.builtin.replace:
path: /etc/apt/sources.list.d/ubuntu.sources
regexp: '^Components:.*$'
replace: 'Components: {{ apt_mirror_ubuntu_components }}'
become: true
when:
- apt_mirror_enabled | default(false) | bool
- apt_mirror_airgapped | default(false) | bool
- ansible_distribution == "Ubuntu"

- name: client - remove old proxy apt.conf.d files
ansible.builtin.file:
path: "{{ item }}"
state: absent
become: true
loop:
- /etc/apt/apt.conf.d/00range42-proxy
- /etc/apt/apt.conf.d/01-r42-bootstrap-block
- /etc/apt/apt.conf.d/01proxy
when: apt_mirror_enabled | default(false) | bool

- name: client - rewrite debian mirror list
ansible.builtin.copy:
content: "{{ _apt_effective_url }}/deb.debian.org/debian\n"
dest: /etc/apt/mirrors/debian.list
owner: root
group: root
mode: "0644"
become: true
notify: update apt cache
when:
- apt_mirror_enabled | default(false) | bool
- _apt_effective_url is defined
- _apt_effective_url | length > 0
- ansible_distribution == "Debian"

- name: client - rewrite debian-security mirror list
ansible.builtin.copy:
content: "{{ _apt_effective_url }}/security.debian.org/debian-security\n"
dest: /etc/apt/mirrors/debian-security.list
owner: root
group: root
mode: "0644"
become: true
notify: update apt cache
when:
- apt_mirror_enabled | default(false) | bool
- _apt_effective_url is defined
- _apt_effective_url | length > 0
- ansible_distribution == "Debian"

- name: client - rewrite ubuntu archive URI
ansible.builtin.replace:
path: /etc/apt/sources.list.d/ubuntu.sources
regexp: 'http://archive\.ubuntu\.com/ubuntu'
replace: "{{ _apt_effective_url }}/archive.ubuntu.com/ubuntu"
become: true
notify: update apt cache
when:
- apt_mirror_enabled | default(false) | bool
- _apt_effective_url is defined
- _apt_effective_url | length > 0
- ansible_distribution == "Ubuntu"

- name: client - rewrite ubuntu security URI
ansible.builtin.replace:
path: /etc/apt/sources.list.d/ubuntu.sources
regexp: 'http://security\.ubuntu\.com/ubuntu'
replace: "{{ _apt_effective_url }}/security.ubuntu.com/ubuntu"
become: true
notify: update apt cache
when:
- apt_mirror_enabled | default(false) | bool
- _apt_effective_url is defined
- _apt_effective_url | length > 0
- ansible_distribution == "Ubuntu"
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Acquire::http::Proxy "http://{{ apt_proxy_url }}:{{ apt_mirror_port }}/";
Acquire::https::Proxy "DIRECT";
{% if apt_mirror_fallback %}
Acquire::http::ConnectTimeout "{{ apt_mirror_connect_timeout }}";
{% endif %}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
apt:
name: rsync
state: present
update_cache: yes

Check warning on line 12 in 02_ansible_layer/admin/roles/software.configure.docker-compose/tasks/debian-based/deploy.yml

View workflow job for this annotation

GitHub Actions / Ansible Lint

yaml[truthy]

Truthy value should be one of [false, true]

#
- name: DEPLOY DOCKER FILES - CREATE TMP DIR
Expand All @@ -26,7 +26,7 @@
synchronize:
src: "{{ LOCAL__PROJECT_DIR }}/"
dest: "{{ REMOTE_PROJECT_DIR }}/"
recursive: yes

Check warning on line 29 in 02_ansible_layer/admin/roles/software.configure.docker-compose/tasks/debian-based/deploy.yml

View workflow job for this annotation

GitHub Actions / Ansible Lint

yaml[truthy]

Truthy value should be one of [false, true]
rsync_opts:
- "--exclude=poc/"
- "-e ssh --info=progress2"
Expand All @@ -39,7 +39,7 @@
synchronize:
src: "{{ LOCAL__PROJECT_DIR }}/"
dest: "{{ REMOTE_PROJECT_DIR }}/"
recursive: yes

Check warning on line 42 in 02_ansible_layer/admin/roles/software.configure.docker-compose/tasks/debian-based/deploy.yml

View workflow job for this annotation

GitHub Actions / Ansible Lint

yaml[truthy]

Truthy value should be one of [false, true]
rsync_opts:
- "-e ssh --info=progress2"
delegate_to: localhost
Expand All @@ -51,10 +51,18 @@
block:
#
#
# Retry on transient failures (intermittent registry/mirror anycast timeouts
# pulling images are common on egress-filtered ranges). `up` is idempotent,
# so re-running resumes the pull. A persistent failure still surfaces after
# the retries are exhausted.
- name: DOCKER - DOCKER-COMPOSE - RUN
community.docker.docker_compose_v2:
project_src: "{{ REMOTE_PROJECT_DIR }}"
state: present
register: compose_run
until: compose_run is succeeded
retries: 5
delay: 20
#
- name: DOCKER - GET CONTAINER INFO {{ LABEL_PROJET_NAME }}
community.docker.docker_container_info:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
ansible.builtin.setup:

#
- name: INCLUDE - ufw tasks - ubuntu
ansible.builtin.include_tasks: ./ubuntu/deploy.yml
when: ansible_facts['distribution'] == "Ubuntu"
# Tasks in ./debian-based/deploy.yml are apt/rsync based, so they run on every
# Debian-family host (Ubuntu + Debian).
- name: INCLUDE - deploy tasks - debian-based
ansible.builtin.include_tasks: ./debian-based/deploy.yml
when: ansible_facts['distribution'] in ['Ubuntu', 'Debian']

#### #### #### #### #### #### #### #### #### #### #### #### #### #### #### #### ####
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
when: ansible_facts['distribution'] == "Fedora"

#
- name: INCLUDE - ufw tasks - ubuntu
ansible.builtin.include_tasks: ./ubuntu/ufw.yml
when: ansible_facts['distribution'] == "Ubuntu"
- name: INCLUDE - ufw tasks - debian-based
ansible.builtin.include_tasks: ./debian-based/ufw.yml
when: ansible_facts['distribution'] in ['Ubuntu', 'Debian']

#### #### #### #### #### #### #### #### #### #### #### #### #### #### #### #### ####
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
# defaults file
apt_cacher_port: 3142
apt_cacher_passthrough: true
apt_cacher_cache_dir: /var/cache/apt-cacher-ng
apt_cacher_log_dir: /var/log/apt-cacher-ng
apt_cacher_bind_address: "0.0.0.0"
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
# handlers file

- name: restart apt-cacher-ng
ansible.builtin.systemd:
name: apt-cacher-ng
state: restarted
become: true
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
---
Loading
Loading