-
Notifications
You must be signed in to change notification settings - Fork 2
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 #1 from Oefenweb/initial-working-version
Initial working version
- Loading branch information
Showing
14 changed files
with
294 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,30 @@ | ||
# OS generated files # | ||
###################### | ||
.DS_Store | ||
.DS_Store? | ||
._* | ||
.Spotlight-V100 | ||
.Trashes | ||
Icon? | ||
ehthumbs.db | ||
Thumbs.db | ||
|
||
# IDE files # | ||
################# | ||
/.settings | ||
/.buildpath | ||
/.project | ||
/nbproject | ||
*.komodoproject | ||
*.kpf | ||
/.idea | ||
|
||
# Vagrant files # | ||
.virtualbox/ | ||
.vagrant/ | ||
vagrant_ansible_inventory_* | ||
ansible.cfg | ||
|
||
# Other files # | ||
############### | ||
!empty |
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,72 @@ | ||
--- | ||
sudo: required | ||
dist: trusty | ||
|
||
language: python | ||
python: "2.7" | ||
|
||
env: | ||
- ANSIBLE_VERSION=latest | ||
- ANSIBLE_VERSION=2.0.2.0 | ||
- ANSIBLE_VERSION=2.0.1.0 | ||
- ANSIBLE_VERSION=2.0.0.2 | ||
- ANSIBLE_VERSION=2.0.0.1 | ||
- ANSIBLE_VERSION=2.0.0.0 | ||
- ANSIBLE_VERSION=1.9.6 | ||
- ANSIBLE_VERSION=1.9.5 | ||
- ANSIBLE_VERSION=1.9.4 | ||
- ANSIBLE_VERSION=1.9.3 | ||
- ANSIBLE_VERSION=1.9.2 | ||
- ANSIBLE_VERSION=1.9.1 | ||
- ANSIBLE_VERSION=1.9.0.1 | ||
- ANSIBLE_VERSION=1.8.4 | ||
- ANSIBLE_VERSION=1.8.3 | ||
- ANSIBLE_VERSION=1.8.2 | ||
- ANSIBLE_VERSION=1.8.1 | ||
- ANSIBLE_VERSION=1.8 | ||
- ANSIBLE_VERSION=1.7.2 | ||
- ANSIBLE_VERSION=1.7.1 | ||
- ANSIBLE_VERSION=1.7 | ||
- ANSIBLE_VERSION=1.6.9 | ||
- ANSIBLE_VERSION=1.6.8 | ||
- ANSIBLE_VERSION=1.6.7 | ||
- ANSIBLE_VERSION=1.6.6 | ||
- ANSIBLE_VERSION=1.6.5 | ||
- ANSIBLE_VERSION=1.6.4 | ||
- ANSIBLE_VERSION=1.6.3 | ||
- ANSIBLE_VERSION=1.6.2 | ||
- ANSIBLE_VERSION=1.6.10 | ||
- ANSIBLE_VERSION=1.6.1 | ||
- ANSIBLE_VERSION=1.6 | ||
|
||
branches: | ||
only: | ||
- master | ||
|
||
before_install: | ||
- sudo apt-get update -qq | ||
|
||
install: | ||
# Install Ansible. | ||
- if [ "$ANSIBLE_VERSION" = "latest" ]; then pip install --no-binary ansible ansible; else pip install --no-binary ansible ansible==$ANSIBLE_VERSION; fi | ||
|
||
script: | ||
# Check the role/playbook's syntax. | ||
- ansible-playbook -i tests/inventory tests/test.yml --syntax-check | ||
|
||
# Run the role/playbook with ansible-playbook. | ||
- ansible-playbook -i tests/inventory tests/test.yml -vvvv | ||
|
||
# Run the role/playbook again, checking to make sure it's idempotent. | ||
- > | ||
ansible-playbook -i tests/inventory tests/test.yml | ||
| grep -q 'changed=0.*failed=0' | ||
&& (echo 'Idempotence test: pass' && exit 0) | ||
|| (echo 'Idempotence test: fail' && exit 1) | ||
notifications: | ||
email: false | ||
hipchat: | ||
rooms: | ||
secure: mWog3ZLMyqRZ9UFlXusd1Z3Pxem1aHHBPwT194s8ibFWxVFX703QGGGT1CD/w/lCYVcO5qiaXrsViAMDpbdbdn4VeIEgme8h6oU1GklnNFVQXbkKsQimDERh1xFCA5XoVt3+slAgQU+7RbAjUnvyfWWFnhrmimL8GvKkIDvdkfe6OieFoM8B8bClG0yMLfteVRAV+DB657mnieu5rxxumPo5r3N3MJ23zFSdrJHVZHMpAaIxO70aagdzHFHpkCD4hbSFsQQDcQU+4rZQtohCe1CciwYiw//3fYygTerM2+4+jtqrh9sAn1ebTsm8CdG+kA4aSIpa8axUSOunIDYAkq4Q+yJM/Xvti+Dbcd8Q2rX0E7Hxd4YKGm8Brtuk8SfMvIQvMx+7KlDM4h3vyO7+vmMM3RZ7rWICRAkjFM7yVOkZ0s1SpJpZ3DjSkeGJtbaq7wA30d6Ciu1i8RDx3JPwhCGWCkTL5CS7UKiRT6qhEr9gK5QF7rnwJoCsZEsAJIDsooJwp7ElGgydINPhXeJZ+UNJoBMr8kevTa1+37JKUYp3kjUq49gg4oZMNanGSqmA+5q3EkKnFv0B/xBPIyCm5EJ6kt33K/oT1JSPX+2rEV0/4TUT9xVmb/2iMafLnBGf0Ii9tgTE+6uYMVwFqyd6U6Sc4jwmhhmPfJ/5aHEAIEM= | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
## dropbox | ||
|
||
[![Build Status](https://travis-ci.org/Oefenweb/ansible-dropbox.svg?branch=master)](https://travis-ci.org/Oefenweb/ansible-dropbox) [![Ansible Galaxy](http://img.shields.io/badge/ansible--galaxy-dropbox-blue.svg)](https://galaxy.ansible.com/Oefenweb/ansible-dropbox) | ||
|
||
Set up [Dropbox](https://www.dropbox.com/) in Debian-like systems. | ||
|
||
#### Requirements | ||
|
||
None | ||
|
||
#### Variables | ||
|
||
* `dropbox_version` [default: `2015.10.28`]: Version to install | ||
|
||
## Dependencies | ||
|
||
None | ||
|
||
#### Example | ||
|
||
```yaml | ||
--- | ||
- hosts: all | ||
roles: | ||
- dropbox | ||
``` | ||
#### License | ||
MIT | ||
#### Author Information | ||
Mischa ter Smitten | ||
#### Feedback, bug-reports, requests, ... | ||
Are [welcome](https://github.com/Oefenweb/ansible-dropbox/issues)! |
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,69 @@ | ||
# -*- mode: ruby -*- | ||
# vi: set ft=ruby ts=2 sw=2 tw=0 et : | ||
|
||
role = File.basename(File.expand_path(File.dirname(__FILE__))) | ||
|
||
boxes = [ | ||
{ | ||
:name => "ubuntu-1204", | ||
:box => "opscode-ubuntu-12.04", | ||
:url => "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-12.04_chef-provisionerless.box", | ||
:ip => '10.0.0.11', | ||
:cpu => "50", | ||
:ram => "256" | ||
}, | ||
{ | ||
:name => "ubuntu-1404", | ||
:box => "opscode-ubuntu-14.04", | ||
:url => "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-14.04_chef-provisionerless.box", | ||
:ip => '10.0.0.12', | ||
:cpu => "50", | ||
:ram => "256" | ||
}, | ||
{ | ||
:name => "ubuntu-1604", | ||
:box => "opscode-ubuntu-16.04", | ||
:url => "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-16.04_chef-provisionerless.box", | ||
:ip => '10.0.0.13', | ||
:cpu => "50", | ||
:ram => "256" | ||
}, | ||
{ | ||
:name => "debian-710", | ||
:box => "opscode-debian-7.10", | ||
:url => "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_debian-7.10_chef-provisionerless.box", | ||
:ip => '10.0.0.14', | ||
:cpu => "50", | ||
:ram => "256" | ||
}, | ||
{ | ||
:name => "debian-84", | ||
:box => "opscode-debian-8.4", | ||
:url => "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_debian-8.4_chef-provisionerless.box", | ||
:ip => '10.0.0.15', | ||
:cpu => "50", | ||
:ram => "256" | ||
}, | ||
] | ||
|
||
Vagrant.configure("2") do |config| | ||
boxes.each do |box| | ||
config.vm.define box[:name] do |vms| | ||
vms.vm.box = box[:box] | ||
vms.vm.box_url = box[:url] | ||
vms.vm.hostname = "ansible-#{role}-#{box[:name]}" | ||
|
||
vms.vm.provider "virtualbox" do |v| | ||
v.customize ["modifyvm", :id, "--cpuexecutioncap", box[:cpu]] | ||
v.customize ["modifyvm", :id, "--memory", box[:ram]] | ||
end | ||
|
||
vms.vm.network :private_network, ip: box[:ip] | ||
|
||
vms.vm.provision :ansible do |ansible| | ||
ansible.playbook = "tests/vagrant.yml" | ||
ansible.verbose = "vv" | ||
end | ||
end | ||
end | ||
end |
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 @@ | ||
# defaults file for dropbox | ||
--- | ||
dropbox_version: 2015.10.28 |
Empty file.
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 @@ | ||
# handlers file for dropbox | ||
--- |
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,24 @@ | ||
# meta file for dropbox | ||
--- | ||
galaxy_info: | ||
author: Mischa ter Smitten | ||
company: Oefenweb.nl B.V. | ||
description: Set up Dropbox in Debian-like systems | ||
license: MIT | ||
min_ansible_version: 1.6 | ||
platforms: | ||
- name: Ubuntu | ||
versions: | ||
- precise | ||
- trusty | ||
- xenial | ||
- name: Debian | ||
versions: | ||
- wheezy | ||
- jessie | ||
galaxy_tags: | ||
- development | ||
- system | ||
- networking | ||
- sync | ||
dependencies: [] |
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,33 @@ | ||
# tasks file for dropbox | ||
--- | ||
- name: create (download) directory | ||
file: | ||
path: "{{ dropbox_downloads_path }}" | ||
state: directory | ||
owner: root | ||
group: root | ||
mode: 0755 | ||
tags: | ||
- configuration | ||
- dropbox | ||
- dropbox-download | ||
|
||
- name: download | ||
get_url: | ||
url: "https://www.dropbox.com/download?dl=packages/{{ ansible_distribution | lower }}/dropbox_{{ dropbox_version }}_{{ dropbox_machine_map[ansible_machine] }}.deb" | ||
dest: "{{ dropbox_downloads_path }}/dropbox_{{ dropbox_version }}_{{ dropbox_machine_map[ansible_machine] }}.deb" | ||
owner: root | ||
group: root | ||
mode: 0644 | ||
tags: | ||
- configuration | ||
- dropbox | ||
- dropbox-download | ||
|
||
- name: install deb file | ||
apt: | ||
deb: "{{ dropbox_downloads_path }}/dropbox_{{ dropbox_version }}_{{ dropbox_machine_map[ansible_machine] }}.deb" | ||
tags: | ||
- configuration | ||
- dropbox | ||
- dropbox-install-deb |
Empty file.
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,7 @@ | ||
# test file for dropbox | ||
--- | ||
- hosts: localhost | ||
connection: local | ||
sudo: true | ||
roles: | ||
- ../../ |
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,7 @@ | ||
# test file for dropbox | ||
--- | ||
- hosts: all | ||
remote_user: vagrant | ||
sudo: true | ||
roles: | ||
- ../../ |
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 @@ | ||
# vars file for dropbox | ||
--- | ||
dropbox_downloads_path: /var/lib/ansible/dropbox/downloads | ||
dropbox_machine_map: | ||
i686: 386 | ||
i386: 386 | ||
x86_64: amd64 | ||
amd64: amd64 |