-
Notifications
You must be signed in to change notification settings - Fork 0
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 #2 from solutionDrive/change-travis
Change travis
- Loading branch information
Showing
11 changed files
with
69 additions
and
51 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 |
---|---|---|
@@ -1,29 +1,36 @@ | ||
--- | ||
language: python | ||
python: "2.7" | ||
services: docker | ||
|
||
# Use the new container infrastructure | ||
sudo: false | ||
env: | ||
- distro: ubuntu1804 | ||
- distro: ubuntu1604 | ||
- distro: ubuntu1404 | ||
- distro: debian9 | ||
- distro: debian8 | ||
|
||
# Install ansible | ||
addons: | ||
apt: | ||
packages: | ||
- python-pip | ||
before_script: | ||
# Check for correct eof newlines | ||
- wget -O ${PWD}/tests/check-eof-newline.sh https://gist.github.com/sd-lueckel/fd262b2570c270bf8695ed6bdd388727/raw/ | ||
- chmod +x ${PWD}/tests/check-eof-newline.sh | ||
- ${PWD}/tests/check-eof-newline.sh | ||
|
||
install: | ||
# Install ansible | ||
- pip install ansible | ||
# Check for line endings | ||
- wget -O ${PWD}/tests/check-line-endings.sh https://gist.github.com/sd-lueckel/1114f569d0a60f3447b28cc7c82f8fd4/raw/ | ||
- chmod +x ${PWD}/tests/check-line-endings.sh | ||
- ${PWD}/tests/check-line-endings.sh | ||
|
||
# Check ansible version | ||
- ansible --version | ||
|
||
# Create ansible.cfg with correct roles_path | ||
- printf '[defaults]\nroles_path=../' >ansible.cfg | ||
# Check for trailing whitespaces | ||
- wget -O ${PWD}/tests/check-trailing_whitespaces.sh https://gist.github.com/sd-lueckel/335ef1b6a9e996b384748a3e1cf15b61/raw/ | ||
- chmod +x ${PWD}/tests/check-trailing_whitespaces.sh | ||
- ${PWD}/tests/check-trailing_whitespaces.sh | ||
|
||
script: | ||
# Basic role syntax check | ||
- ansible-playbook tests/test.yml -i tests/inventory --syntax-check | ||
# Download test shim. | ||
- wget -O ${PWD}/tests/test.sh https://gist.githubusercontent.com/geerlingguy/73ef1e5ee45d8694570f334be385e181/raw/ | ||
- chmod +x ${PWD}/tests/test.sh | ||
|
||
# Run tests. | ||
- ${PWD}/tests/test.sh | ||
|
||
notifications: | ||
webhooks: https://galaxy.ansible.com/api/v1/notifications/ |
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
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 |
---|---|---|
|
@@ -3,6 +3,3 @@ | |
src='gitconfig' | ||
dest='/etc/gitconfig' | ||
force=no | ||
become: yes | ||
|
||
|
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 |
---|---|---|
@@ -1,24 +1,24 @@ | ||
--- | ||
- name: Ensure global known_hosts files exist | ||
file: | ||
path: "{{ deployment_global_ssh_known_hosts_file }}" | ||
state: touch | ||
mode: 0644 | ||
|
||
- name: Add bitbucket.org to global known_hosts | ||
lineinfile: | ||
path: "{{ deployment_global_ssh_known_hosts_file }}" | ||
line: "{{ deployment_bitbucket_public_host_key }}" | ||
create: yes | ||
mode: 0644 | ||
state: present | ||
|
||
- name: Add packagist.org to global known_hosts | ||
lineinfile: | ||
path: "{{ deployment_global_ssh_known_hosts_file }}" | ||
line: "{{ deployment_packagist_public_host_key }}" | ||
create: yes | ||
mode: 0644 | ||
state: present | ||
|
||
- name: Add github.com to global known_hosts | ||
lineinfile: | ||
path: "{{ deployment_global_ssh_known_hosts_file }}" | ||
line: "{{ deployment_github_public_host_key }}" | ||
create: yes | ||
mode: 0644 | ||
state: present |
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,3 @@ | ||
{ | ||
"Authentication": "I am root!" | ||
} |
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,2 @@ | ||
This is a private key file! | ||
It is absolutly secure :D |
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,2 @@ | ||
This is a public key file! | ||
It is ok to show it to the world :D |
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 |
---|---|---|
@@ -1,5 +1,14 @@ | ||
--- | ||
- hosts: localhost | ||
remote_user: root | ||
- hosts: all | ||
become: yes | ||
|
||
vars: | ||
deployment_key_remove_key_from_root: false | ||
|
||
pre_tasks: | ||
- name: Update apt cache. | ||
apt: update_cache=yes cache_valid_time=600 | ||
when: ansible_os_family == 'Debian' | ||
|
||
roles: | ||
- solutiondrive.deployment | ||
- role_under_test |