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

Create playbook to update allsearch banner #5463

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
add default path
pass the path and environment variables

Co-authored-by: Beck Davis <beck-davis@users.noreply.github.com>
Co-authored-by: Vickie Karasic <vickiekarasic@users.noreply.github.com>
  • Loading branch information
3 people committed Dec 31, 2024
commit 95bc00e650c5b84c8327ba964621177236b0ed90
5 changes: 3 additions & 2 deletions playbooks/allsearch_banner.yml
Original file line number Diff line number Diff line change
@@ -4,7 +4,8 @@
- name: change the Allsearch banner
hosts: allsearch_api_{{ runtime_env | default('staging') }}
remote_user: deploy
# become: true
vars:
- passenger_root: "/opt/allsearch_api/current"
vars_files:
- ../group_vars/allsearch_api/vault.yml
- ../group_vars/allsearch_api/common.yml
@@ -18,7 +19,7 @@
# - pan-os-python

- name: Run the Rake task
ansible.builtin.shell: "cd /opt/allsearch_api/current && /usr/bin/bash --login -c 'RAILS_ENV=staging bundle exec rake banner:update['{{ banner_text }}',{{alert_status | default('info') }},{{dismissible | default('true')}},{{autoclear | default('false')}}]'"
ansible.builtin.shell: "cd {{ passenger_root }} && /usr/bin/bash --login -c 'RAILS_ENV={{ rails_env | default('staging') }} bundle exec rake banner:update['{{ banner_text }}',{{alert_status | default('info') }},{{dismissible | default('true')}},{{autoclear | default('false')}}]'"
#bundle exec rake banner:update\['new banner',info,true,true\]
#text,alert_status[info|success|warning|error],dismissible,autoclear