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

Replace http with https and fake cert in local VMs #896

Merged
merged 7 commits into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from 5 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
26 changes: 0 additions & 26 deletions .devenv

This file was deleted.

3 changes: 3 additions & 0 deletions bin/lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

exec ansible-lint site.yml playbooks/*.yml --exclude community
10 changes: 6 additions & 4 deletions inventory/group_vars/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,8 @@ retired_core_devs:
# nginx config

app_root: "{{ current_path }}"
ssl_certificate: "/etc/letsencrypt/live/{{ certbot_cert_name | default(domain) }}/fullchain.pem"
ssl_certificate_key: "/etc/letsencrypt/live/{{ certbot_cert_name | default(domain) }}/privkey.pem"

nginx_official_repo: True

Expand Down Expand Up @@ -324,8 +326,8 @@ nginx_sites:
listen [::]:443 ssl http2;
server_name www.{{ domain }};

ssl_certificate /etc/letsencrypt/live/{{ certbot_cert_name | default(domain) }}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/{{ certbot_cert_name | default(domain) }}/privkey.pem;
ssl_certificate {{ ssl_certificate }};
ssl_certificate_key {{ ssl_certificate_key }};

{{ nginx_tls_cipher_suites }}

Expand All @@ -338,8 +340,8 @@ nginx_sites:
server_name {{ certbot_domains | default([domain]) | join(' ') }};
root {{ app_root }}/public;

ssl_certificate /etc/letsencrypt/live/{{ certbot_cert_name | default(domain) }}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/{{ certbot_cert_name | default(domain) }}/privkey.pem;
ssl_certificate {{ ssl_certificate }};
ssl_certificate_key {{ ssl_certificate_key }};

{{ nginx_tls_cipher_suites }}

Expand Down
65 changes: 0 additions & 65 deletions inventory/group_vars/lexi.yml

This file was deleted.

38 changes: 38 additions & 0 deletions inventory/group_vars/local.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
rails_env: "staging"

ssl_certificate: "/etc/ssl/certs/ssl-cert-snakeoil.pem"
ssl_certificate_key: "/etc/ssl/private/ssl-cert-snakeoil.key"

# See https://github.com/openfoodfoundation/ofn-install/wiki/Setup for more info
checkout_zone: Australia
country_code: AU
currency: AUD
locale: en
language: en_AU.UTF-8
language_packages:
- language-pack-en-base
l10n_repo: https://github.com/openfoodfoundation/l10n_au.git
timezone: Melbourne

developer_email: [email protected]

users_sysadmin:
- "{{ core_devs }}"

# Test host configuration
Copy link
Member

Choose a reason for hiding this comment

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

Seeing as the whole section below is pertaining to test/local hosts, maybe we can make this look more like section comment:

Suggested change
# Test host configuration
# *** Test host configuration ***

(I'm not sure if we have another convention in this codebase already, or you have a different preference. If so pls update!)

# This is usually set in the host config but the same for all local containers.
domain: localhost

admin_email: [email protected]
mail_domain: example.com

# Add missing vars to emulate /local_vagrant/secrets.yml
Copy link
Member

Choose a reason for hiding this comment

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

I think the exact path of secrets.yml is unimportant here:

Suggested change
# Add missing vars to emulate /local_vagrant/secrets.yml
# Add missing vars to emulate secrets.yml

db_password: 'f00d'
admin_password: 'ofn123'
secret_token: '511a3d0fa1551b9fa75a1aef5b47684905c64807963fa2c190272878366365'
google_maps_api_key: 'xxx'

mail_host: 'example.com'
mail_port: 25
smtp_username: 'admin'
smtp_password: 'password'
17 changes: 0 additions & 17 deletions inventory/group_vars/lxc.yml

This file was deleted.

63 changes: 0 additions & 63 deletions inventory/group_vars/test.yml

This file was deleted.

67 changes: 0 additions & 67 deletions inventory/group_vars/vagrant.yml

This file was deleted.

18 changes: 0 additions & 18 deletions inventory/host_vars/local_lexi/config.yml

This file was deleted.

24 changes: 0 additions & 24 deletions inventory/host_vars/local_test/config.yml

This file was deleted.

18 changes: 0 additions & 18 deletions inventory/host_vars/local_vagrant/config.yml

This file was deleted.

19 changes: 0 additions & 19 deletions inventory/host_vars/ofn.local/config.yml

This file was deleted.

Loading
Loading