infra/deprecated/playbooks/tasks/tests/local-site-presence.yml
shockrah 79bd7424c3
Some checks failed
Ansible Linting / ansible-lint (push) Failing after 4s
Secops Linting and Safety Checks / checkov-scan-s3 (push) Failing after 17s
Moving around more stuff
2025-05-12 00:18:24 -07:00

27 lines
692 B
YAML

- name: Add local routing for the server confs
lineinfile:
path: /etc/hosts
state: present
line: "127.0.0.1 {{ item }}"
loop: "{{ websites }}"
- name: Curl the local endpoints to check connection nginx reverse proxy
uri:
url: "http://{{ item }}"
status_code:
- 200
- 404
loop: "{{ websites }}"
- name: Sanity Check the nginx reverse proxy
uri:
url: "http://not-real.{{ item }}"
loop: "{{ websites }}"
register: result
failed_when: result.status != -1
- name: Cleanup /etc/hosts
lineinfile:
path: /etc/hosts
state: absent
line: "127.0.0.1 {{ item }}"
loop: "{{ websites }}"