Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add web service to fastly setup #2156

Merged
merged 3 commits into from
Nov 25, 2024
Merged
Changes from all commits
Commits
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
15 changes: 10 additions & 5 deletions ansible/fastly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
fastly_service:
name: "{{ item.service }}.theforeman.org"
fastly_api_key: "{{ fastly_api_key }}"
domains:
- name: "{{ item.service }}.theforeman.org"
domains: "{{ item.domains | default([{'name': item.service ~ '.theforeman.org'}]) }}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's ~ here?

Copy link
Member Author

@evgeni evgeni Nov 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

String concat.

As I can't put jinja inside jinja.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess that and tried to look for that but somehow I couldn't find it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

documenting things properly is complicated, as you know :)

backends:
- name: "{{ item.backend }}.theforeman.org"
address: "{{ item.backend }}.theforeman.org"
Expand All @@ -20,11 +19,11 @@
ssl_cert_hostname: "{{ item.backend }}.theforeman.org"
ssl_sni_hostname: "{{ item.backend }}.theforeman.org"
override_host: "{{ item.backend }}.theforeman.org"
healthcheck: HEADER.html
healthcheck: "{{ item.healthcheck | default('HEADER.html') }}"
healthchecks:
- name: HEADER.html
- name: "{{ item.healthcheck | default('HEADER.html') }}"
host: "{{ item.backend }}.theforeman.org"
path: "/HEADER.html"
path: "/{{ item.healthcheck | default('HEADER.html') }}"
threshold: 1
timeout: 5000
window: 2
Expand All @@ -43,3 +42,9 @@
backend: stagingyum-backend.web01.osuosl
- service: yum
backend: yum-backend.web01.osuosl
- service: www
backend: web-backend.web01.osuosl
healthcheck: index.html
domains:
- name: www.theforeman.org
- name: theforeman.org