Skip to content

Restructure repo into idiomatic Ansible layout, fix bugs, deduplicate charts#48

Open
Kimi450 wants to merge 1 commit intomainfrom
refactor
Open

Restructure repo into idiomatic Ansible layout, fix bugs, deduplicate charts#48
Kimi450 wants to merge 1 commit intomainfrom
refactor

Conversation

@Kimi450
Copy link
Copy Markdown
Owner

@Kimi450 Kimi450 commented Apr 22, 2026

Restructure repo into idiomatic Ansible layout, fix bugs, deduplicate charts
Layout

  • Move playbooks into playbooks/ with shorter names (e.g.
    install-and-configure-samba.yaml -> playbooks/samba.yaml)
  • Move task includes into tasks/ and static assets into files/
  • Rename group_vars/all -> group_vars/all.yaml
  • Rename setup.yaml -> site.yaml (Ansible convention)
  • Relocate deprecated spotify playbook under playbooks/deprecated/
    New files
  • ansible.cfg: default inventory, no host-key check, SSH pipelining +
    ControlMaster, YAML stdout callback, smart gathering
  • requirements.yml: declare kubernetes.core, community.general,
    ansible.posix (kubernetes.core was already used but never declared)
  • tasks/process-persistence-disks.yaml: shared helper replacing six
    near-identical persistence-building blocks in charts.yaml

Bug fixes

  • charts.yaml: remove stray '}' in four helm --set strings
    ({{ helm_common_persistence_downloads }}}) for readarr, lidarr,
    calibre-web, calibre
  • deprecated/spotify.yaml: fix reference to non-existent
    tasks_clone_git_repo.yaml
  • .gitignore: '*/kubespray/' is an invalid glob -> '/kubespray/';
    also add .venv/, *.retry, .ansible/, editor noise
  • run.sh: fix broken command -v "ansible-playbook --version"
    check, add shebang, set -euo pipefail, cd to script dir, forward
    args via exec, install Galaxy collections from requirements.yml

Refactors

  • charts.yaml (1248 -> 1041 lines): collapse six persistence blocks
    into one include_tasks loop
  • kubernetes.yaml: rename the misleading "Install kubernetes using
    kubeadm" play (which ran regardless) to install cluster tooling;
    replace shell: curl | install for kubectl with uri + get_url;
    add creates: guard for Helm
  • tasks/reload-systemd.yaml: replace 4-step shell: systemctl ...
    sequence with a single ansible.builtin.systemd_service call
  • samba.yaml: shell: service smbd restart -> ansible.builtin.service
  • deprecated/spotify.yaml: rewrite to use apt, copy, user, and the
    shared reload-systemd task instead of six raw shell: calls

README

  • Add Repository Layout section with tree diagram
  • Update all path references (group_vars/all.yaml, site.yaml,
    files/kubeadm-cp.bash, playbooks/cloudflare-dns-updater.yaml)
  • Expand ./run.sh usage notes (--check, arg forwarding,
    PLAYBOOK/INVENTORY/VENV_DIR env overrides)

Verification

  • ansible-playbook --syntax-check site.yaml -i hosts.yaml: OK
    (only pre-existing warnings for 'become'/'timeout' used as var
    names in include_tasks vars blocks)
  • All 21 YAML files parse cleanly with PyYAML
  • git detects every move as a rename; history preserved

… charts

Layout
- Move playbooks into playbooks/ with shorter names (e.g.
  install-and-configure-samba.yaml -> playbooks/samba.yaml)
- Move task includes into tasks/ and static assets into files/
- Rename group_vars/all -> group_vars/all.yaml
- Rename setup.yaml -> site.yaml (Ansible convention)
- Relocate deprecated spotify playbook under playbooks/deprecated/
New files
- ansible.cfg: default inventory, no host-key check, SSH pipelining +
  ControlMaster, YAML stdout callback, smart gathering
- requirements.yml: declare kubernetes.core, community.general,
  ansible.posix (kubernetes.core was already used but never declared)
- tasks/process-persistence-disks.yaml: shared helper replacing six
  near-identical persistence-building blocks in charts.yaml
Bug fixes
- charts.yaml: remove stray '}' in four helm --set strings
  ({{ helm_common_persistence_downloads }}}) for readarr, lidarr,
  calibre-web, calibre
- deprecated/spotify.yaml: fix reference to non-existent
  tasks_clone_git_repo.yaml
- .gitignore: '***/kubespray/' is an invalid glob -> '**/kubespray/';
  also add .venv/, *.retry, .ansible/, editor noise
- run.sh: fix broken `command -v "ansible-playbook --version"`
  check, add shebang, set -euo pipefail, cd to script dir, forward
  args via exec, install Galaxy collections from requirements.yml
Refactors
- charts.yaml (1248 -> 1041 lines): collapse six persistence blocks
  into one include_tasks loop
- kubernetes.yaml: rename the misleading "Install kubernetes using
  kubeadm" play (which ran regardless) to install cluster tooling;
  replace `shell: curl | install` for kubectl with uri + get_url;
  add `creates:` guard for Helm
- tasks/reload-systemd.yaml: replace 4-step shell: systemctl ...
  sequence with a single ansible.builtin.systemd_service call
- samba.yaml: `shell: service smbd restart` -> ansible.builtin.service
- deprecated/spotify.yaml: rewrite to use apt, copy, user, and the
  shared reload-systemd task instead of six raw shell: calls
README
- Add Repository Layout section with tree diagram
- Update all path references (group_vars/all.yaml, site.yaml,
  files/kubeadm-cp.bash, playbooks/cloudflare-dns-updater.yaml)
- Expand ./run.sh usage notes (--check, arg forwarding,
  PLAYBOOK/INVENTORY/VENV_DIR env overrides)
Verification
- ansible-playbook --syntax-check site.yaml -i hosts.yaml: OK
  (only pre-existing warnings for 'become'/'timeout' used as var
  names in include_tasks vars blocks)
- All 21 YAML files parse cleanly with PyYAML
- git detects every move as a rename; history preserved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant