Files
test/roles/ensure_apache/defaults/main.yml
T
jmrothst eb2dd37385 feat(ensure_apache): synchronize website content from local temp staging
Replace remote git checkouts on target web nodes with an orchestrated
local staging and rsync deployment pipeline.

Recent OpenSSH updates in Fedora dropped agent forwarding into remote
sessions, breaking remote git fetch operations. Furthermore, pulling
directly from Git on production servers exposed .git repositories in
public webroots and required target servers to hold Git credentials.

- Create an ephemeral, unguessable local staging directory (0700) on
  localhost via ansible.builtin.tempfile scoped by inventory_hostname.
- Stage checkouts using repo hash prefixes to prevent collision when
  public and private servers share identical FQDNs.
- Execute shallow checkouts (depth: 1) on the control node using local
  credentials.
- Push website content to /srv/http/{fqdn}/ via ansible.posix.synchronize
  with checksum delta comparisons and automated cleanup (--delete).
- Introduce ensure_apache_rsync_excludes in role defaults to strip
  .git*, .env*, CI/CD pipelines (.gitea, .github), editor swap files,
  and OS metadata while preserving .htaccess and /.well-known/.
- Enforce httpd_sys_content_t SELinux context recursively across webroots.
- Guarantee staging directory cleanup on localhost via an always block.
2026-09-07 23:35:05 -05:00

17 lines
407 B
YAML

---
# defaults file for ensure_apache
lets_encrypt_admin: root@example.com
lets_encrypt_url: https://acme-v02.api.letsencrypt.org/directory
ensure_apache_rsync_excludes:
- --exclude=*.bak
- --exclude=*.swo
- --exclude=*.swp
- --exclude=*~
- --exclude=.DS_Store
- --exclude=.env*
- --exclude=.git*
- --exclude=.gitea
- --exclude=.github
- --exclude=.gitlab-ci.yml
- --exclude=Thumbs.db