You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We want to make it so that folks like Esmé can update the banner on the allsearch-api (which currently updates the Allsearch, but may in the future update other applications as well) without necessarily having a working local environment for it, and without needing to ssh onto the servers. The hope is that this playbook could be added to ansible-tower, and users could log in there to update the information about the banner, including the banner text.
Acceptance criteria
The playbook should accept 5 user-supplied variables
Environment (staging or production - default to staging)
Banner text - which may be a long string that may include html tags
alert_status - string - valid values are info, success, warning, or error
dismissible - boolean
autoclear - boolean
The playbook should then run the allsearch api banner:update rake task on one of the allsearch api servers for the given environment, using the user-supplied variables
It should work correctly if the text includes commas (a rake task gotcha is that you have to escape commas when running it on the command line)
When we recently needed to update the banner text on Orangelight with very little notice, it was difficult to get the change on the servers (in part because of the rake task comma escaping weirdness).
We got this error with the latest iteration of the playbook:
"stderr": "(in /opt/allsearch_api/releases/20241022171231)\nrake aborted!\nActiveRecord::ConnectionNotEstablished: connection to server at \"127.0.0.1\", port 5432 failed: Connection refused (ActiveRecord::ConnectionNotEstablished)\n\tIs the server running on that host and accepting TCP/IP connections?\n/opt/allsearch_api/shared/bundle/ruby/3.3.0/gems/activerecord-7.2.1.1/lib/active_record/connection_adapters/postgresql_adapter.rb:69:in `rescue in new_client'
User story
We want to make it so that folks like Esmé can update the banner on the allsearch-api (which currently updates the Allsearch, but may in the future update other applications as well) without necessarily having a working local environment for it, and without needing to ssh onto the servers. The hope is that this playbook could be added to ansible-tower, and users could log in there to update the information about the banner, including the banner text.
Acceptance criteria
banner:update
rake task on one of the allsearch api servers for the given environment, using the user-supplied variablesConcrete example
When we recently needed to update the banner text on Orangelight with very little notice, it was difficult to get the change on the servers (in part because of the rake task comma escaping weirdness).
Implementation notes, if any
The text was updated successfully, but these errors were encountered: