#!/bin/bash -x
#
# Build - Apply Salt States and Ansible Playbooks
#

# Exit on errors
#
set -e
set -u
set -o pipefail

# Create Salt Links for States and Pillar
# Create Ansible Links for Playbooks and Variables
#
mkdir -p /srv
ln -sf "$(pwd)/salt/roots" /srv/salt
ln -sf "$(pwd)/salt/pillar" /srv/pillar
ln -sf "$(pwd)/ansible" /srv/ansible

# Apply Salt States
#
salt-call --local -l warning state.apply

# Apply Ansible Plays
#
export ANSIBLE_NOCOWS=1
cd /srv/ansible && /usr/bin/ansible-playbook -i hosts site.yml --limit=travis-ci

exit 0
#!/bin/bash -x
#
# Build - Apply Salt States and Ansible Playbooks
#

# Exit on errors
#
set -e
set -u
set -o pipefail

# Create Salt Links for States and Pillar
# Create Ansible Links for Playbooks and Variables
#
mkdir -p /srv
ln -sf "$(pwd)/salt/roots" /srv/salt
ln -sf "$(pwd)/salt/pillar" /srv/pillar
ln -sf "$(pwd)/ansible" /srv/ansible

# Apply Ansible Plays
#
export ANSIBLE_NOCOWS=1
cd /srv/ansible && /usr/bin/ansible-playbook -i hosts site.yml --limit=travis-ci

# Apply Salt States
#
salt-call --local -l warning state.apply

exit 0
Swap Ansible and Salt runs to ensure output regular as seems to stall on Salt from fresh
Swap Ansible and Salt runs to ensure output regular as seems to stall on Salt from fresh
