Skip to content

Commit

Permalink
[orangelight] Move roles into playbook instead of meta/main.yml
Browse files Browse the repository at this point in the history
- This reduces duplication of running roles when running the playbook, and fixes a bug with the deploy_user role when we run the sidekiq role on a subset of boxes

Co-authored-by: Jane Sandberg <[email protected]>
  • Loading branch information
maxkadel and sandbergja committed Jan 8, 2025
1 parent 1b5eb47 commit 86135fd
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 17 deletions.
15 changes: 12 additions & 3 deletions playbooks/orangelight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,21 @@
- ../group_vars/orangelight/{{ runtime_env | default('staging') }}_solr.yml
- ../group_vars/orangelight/vault.yml
roles:
- role: deploy_user
- role: bind9
- role: ruby_s
- role: passenger
- role: postgresql
- role: nodejs
- role: sidekiq_worker
when: "'indexer' in inventory_hostname"
- role: rails_app
- role: sneakers_worker
- role: redis
- role: extra_path
- role: mailcatcher
- role: roles/postgresql
- role: roles/orangelight
- role: roles/datadog
- role: orangelight
- role: datadog
when: runtime_env | default('staging') == "production"

post_tasks:
Expand Down
7 changes: 0 additions & 7 deletions roles/deploy_user/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,6 @@
run_once: true
tags: update_keys

- name: DEBUG DON'T COMMIT ME - inventory
ansible.builtin.debug:
var: hostvars[inventory_hostname]

- name: DEBUG DON'T COMMIT ME - keys
ansible.builtin.debug:
var: deploy_user_keys_from_github

- name: deploy_user | create the .ssh directory
ansible.builtin.file:
Expand Down
9 changes: 2 additions & 7 deletions roles/orangelight/meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,9 @@ galaxy_info:

license: MIT

min_ansible_version: 2.2
min_ansible_version: '2.2'

platforms:
- name: Ubuntu
versions:
- 18.04
dependencies:
- role: 'redis'
- role: 'sneakers_worker'
- role: 'extra_path'
- role: 'rails_app'
- jammy
11 changes: 11 additions & 0 deletions roles/orangelight/molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,17 @@
apt:
update_cache: true
cache_valid_time: 600
roles:
- role: deploy_user
- role: bind9
- role: ruby_s
- role: passenger
- role: postgresql
- role: nodejs
- role: rails_app
- role: sneakers_worker
- role: redis
- role: extra_path
tasks:
- name: "Include orangelight"
include_role:
Expand Down

0 comments on commit 86135fd

Please sign in to comment.