Add a little contrib script to set up ara

This commit is contained in:
Salt 2022-04-23 11:23:36 -05:00
parent 85326fa6fc
commit 64e710ad70
2 changed files with 25 additions and 0 deletions

View File

@ -9,6 +9,8 @@ Useful for management across all of 9iron, thefuck, and desu.
For quick bootstrapping of tools and libraries used in this repo, see [rehashedsalt/ansible-env](https://gitlab.com/rehashedsalt/docker-ansible-env). I use that exact image for CI/CD.
I use ara to record Ansible plays. If your environment has it installed, source the script in `contrib/ara.sh` to configure your environment properly.
## Deployment
### Linux Machines

23
contrib/ara.sh Executable file
View File

@ -0,0 +1,23 @@
#! /bin/bash
#
# ara.sh
# Copyright (C) 2022 Vintage Salt <rehashedsalt@cock.li>
#
# Distributed under terms of the MIT license.
#
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
echo "Source this script, don't execute it"
echo " source \"${0}\""
exit 1
fi
ara="$(python3 -m ara.setup.callback_plugins)"
if [ -n "$ara" ]; then
export ANSIBLE_CALLBACK_PLUGINS="$ara"
export ARA_API_CLIENT="http"
export ARA_API_SERVER="https://ara.desu.ltd"
echo "Ansible configured to report to ara at $ARA_API_SERVER"
else
echo "Unable to find ara; is it installed?"
fi
unset ara