forked from telus/ansible-fish
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request telus#1 from noqcks/master
Added travis-ci tests for the fish role
- Loading branch information
Showing
4 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
language: python | ||
python: "2.7" | ||
|
||
env: | ||
- SITE=test-install.yml | ||
|
||
before_install: | ||
- sudo apt-get update -qq | ||
- sudo apt-get install -y curl | ||
|
||
install: | ||
# Install Ansible. | ||
- pip install ansible | ||
|
||
# Add ansible.cfg to pick up roles path. | ||
- "{ echo '[defaults]'; echo 'roles_path = ../'; } >> ansible.cfg" | ||
|
||
# Install dependencies | ||
- ansible-galaxy install telusdigital.apt-repository | ||
|
||
script: | ||
# Check the role/playbook's syntax. | ||
- "ansible-playbook -i tests/inventory tests/$SITE --syntax-check" | ||
|
||
# Run the role/playbook with ansible-playbook. | ||
- "ansible-playbook -i tests/inventory tests/$SITE --connection=local --sudo" | ||
|
||
# Run the role/playbook again, checking to make sure it's idempotent. | ||
- > | ||
fish -v | ||
|& grep -q 'fish, version' | ||
&& (echo 'Fish installed') | ||
|| (echo 'Fish not installed') | ||
# Just for good measure | ||
- fish -v | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
localhost |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
- hosts: localhost | ||
remote_user: root | ||
roles: | ||
- role: telusdigital.apt-repository | ||
repository_key: "0x27557f056dc33ca5" | ||
repository_url: "deb http://ppa.launchpad.net/fish-shell/release-2/ubuntu {{ ansible_distribution_release }} main" | ||
- role: ansible-fish |