Sample projects that show the use of ansible-solace
to configure Solace PubSub+ Event Brokers using Ansible via REST SEMP v2 (and SEMP v1 if required).
Guide to Creating your own Project.
- python >= 3.6
- ansible >= 2.10
- ansible-solace >= 0.6.1
- docker (e.g. Docker Desktop)
Sequence:
- Homebrew
- Python
- Ansible
# Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew help
# Python
brew install python
brew info python
brew update && brew upgrade python
python3 -V
pip3 -V
# Ansible
pip3 install --upgrade ansible
ansible --version
ansible-playbook --version
# install / upgrade to latest version of ansible-solace
pip3 install --upgrade ansible-solace
pip3 show ansible-solace
List all ansible-solace
modules:
ansible-doc -l | grep solace
Module documentation:
ansible-doc <module_name>
# e.g.
ansible-doc solace_queue
Note: By default, ansible-solace will use /usr/bin/python
.
export ANSIBLE_PYTHON_INTERPRETER={path-to-python-3}
# set the log file path + name
export ANSIBLE_SOLACE_LOG_PATH="./tmp/ansible-solace.log"
# set debug logging to true / false
export ANSIBLE_SOLACE_ENABLE_LOGGING=True
The projects use Solace PubSub+ Standard - the free version - and pull it from docker hub.
cd {project}
./start.local.broker.sh
./run.sh
./stop.local.broker.sh
ls ./tmp/*.log
The End.