-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* installs awscli (and python dependencies if necessary) * TravisCI tests setup and passing * Vagrantfile defaults to Ubuntu and works
- Loading branch information
0 parents
commit 328afc2
Showing
18 changed files
with
233 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,4 @@ | ||
--- | ||
fixtures: | ||
symlinks: | ||
awscli: "#{source_dir}" |
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 @@ | ||
pkg/* | ||
.vagrant* |
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,19 @@ | ||
--- | ||
branches: | ||
only: | ||
- master | ||
language: ruby | ||
rvm: | ||
- 1.9.3 | ||
bundler_args: --without development | ||
script: bundle exec rake spec SPEC_OPTS='--format documentation' | ||
env: | ||
matrix: | ||
- PUPPET_VERSION="2.7.23" | ||
- PUPPET_VERSION="3.0.2" | ||
- PUPPET_VERSION="3.1.1" | ||
- PUPPET_VERSION="3.2.4" | ||
- PUPPET_VERSION="3.3.1" | ||
notifications: | ||
email: | ||
- [email protected] |
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 @@ | ||
source 'https://rubygems.org' | ||
|
||
puppetversion = ENV.key?('PUPPET_VERSION') ? "= #{ENV['PUPPET_VERSION']}" : ['>= 3.2'] | ||
|
||
gem 'rake' | ||
gem 'puppet', puppetversion | ||
gem 'puppet-lint' | ||
gem 'puppetlabs_spec_helper' |
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,42 @@ | ||
GEM | ||
remote: https://rubygems.org/ | ||
specs: | ||
diff-lcs (1.2.5) | ||
facter (1.7.4) | ||
hiera (1.3.0) | ||
json_pure | ||
json_pure (1.8.1) | ||
metaclass (0.0.1) | ||
mocha (0.14.0) | ||
metaclass (~> 0.0.1) | ||
puppet (3.4.1) | ||
facter (~> 1.6) | ||
hiera (~> 1.0) | ||
rgen (~> 0.6.5) | ||
puppet-lint (0.3.2) | ||
puppetlabs_spec_helper (0.4.1) | ||
mocha (>= 0.10.5) | ||
rake | ||
rspec (>= 2.9.0) | ||
rspec-puppet (>= 0.1.1) | ||
rake (10.1.1) | ||
rgen (0.6.6) | ||
rspec (2.14.1) | ||
rspec-core (~> 2.14.0) | ||
rspec-expectations (~> 2.14.0) | ||
rspec-mocks (~> 2.14.0) | ||
rspec-core (2.14.7) | ||
rspec-expectations (2.14.4) | ||
diff-lcs (>= 1.1.3, < 2.0) | ||
rspec-mocks (2.14.4) | ||
rspec-puppet (1.0.1) | ||
rspec | ||
|
||
PLATFORMS | ||
ruby | ||
|
||
DEPENDENCIES | ||
puppet (>= 3.2) | ||
puppet-lint | ||
puppetlabs_spec_helper | ||
rake |
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,20 @@ | ||
Copyright (c) 2014 Justin Downing | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining | ||
a copy of this software and associated documentation files (the | ||
"Software"), to deal in the Software without restriction, including | ||
without limitation the rights to use, copy, modify, merge, publish, | ||
distribute, sublicense, and/or sell copies of the Software, and to | ||
permit persons to whom the Software is furnished to do so, subject to | ||
the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY | ||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | ||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | ||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
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 @@ | ||
name 'jdowning/awscli' | ||
version '0.1.0' | ||
source 'https://github.com/justindowning/puppet-awscli' | ||
author 'Justin Downing' | ||
license 'Apache License, Version 2.0' | ||
summary 'Install awscli' | ||
description 'Install awscli' | ||
project_page 'https://github.com/justindowning/puppet-awscli' |
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,19 @@ | ||
# awscli | ||
|
||
[![Build Status](https://travis-ci.org/justindowning/puppet-awscli.png)](https://travis-ci.org/justindowning/puppet-awscli) | ||
|
||
## Description | ||
|
||
This Puppet module will install [awscli](https://github.com/aws/aws-cli). It is works with Debian/Ubuntu based distros. It should also work with RedHat/CentOS as long as the EPEL repository is available. | ||
|
||
## Installation | ||
|
||
`puppet module install --modulepath /path/to/puppet/modules jdowning-awscli` | ||
|
||
## Usage | ||
|
||
`class { 'awscli': }` | ||
|
||
## Testing | ||
|
||
`vagrant up` |
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,5 @@ | ||
require 'puppet-lint/tasks/puppet-lint' | ||
require 'puppetlabs_spec_helper/rake_tasks' | ||
|
||
PuppetLint.configuration.send("disable_80chars") | ||
PuppetLint.configuration.ignore_paths = ["pkg/**/**/*.pp"] |
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,29 @@ | ||
# -*- mode: ruby -*- | ||
# vi: set ft=ruby : | ||
|
||
Vagrant.configure("2") do |config| | ||
config.vm.hostname = 'puppet-awscli' | ||
config.vm.synced_folder ".", "/tmp/awscli" | ||
|
||
#config.vm.define "centos" do |centos| | ||
# centos.vm.box = 'centos64' | ||
# centos.vm.box_url = 'http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210.box' | ||
# centos.vm.provision :puppet do |puppet| | ||
# puppet.manifests_path = "tests" | ||
# puppet.manifest_file = "vagrant.pp" | ||
# puppet.options = ["--modulepath", "/tmp"] | ||
# end | ||
#end | ||
|
||
config.vm.define "ubuntu" do |ubuntu| | ||
ubuntu.vm.box = 'ubuntu64' | ||
ubuntu.vm.box_url = 'http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210.box' | ||
ubuntu.vm.provision :shell, :inline => 'aptitude update' | ||
ubuntu.vm.provision :puppet do |puppet| | ||
puppet.manifests_path = "tests" | ||
puppet.manifest_file = "vagrant.pp" | ||
puppet.options = ["--modulepath", "/tmp"] | ||
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,10 @@ | ||
# ==Class: awscli::deps | ||
class awscli::deps { | ||
if ! defined(Package['python-dev']) { | ||
package { 'python-dev': ensure => installed } | ||
} | ||
|
||
if ! defined(Package['python-pip']) { | ||
package { 'python-pip': ensure => installed } | ||
} | ||
} |
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 @@ | ||
# == Class: awscli | ||
# | ||
# Install awscli | ||
# | ||
# === Parameters | ||
# | ||
# None | ||
# | ||
# === Variables | ||
# | ||
# None | ||
# | ||
# === Examples | ||
# | ||
# class { awscli: } | ||
# | ||
# === Authors | ||
# | ||
# Justin Downing <[email protected]> | ||
# | ||
# === Copyright | ||
# | ||
# Copyright 2014 Justin Downing | ||
# | ||
class awscli { | ||
include awscli::deps | ||
|
||
package { 'awscli': | ||
ensure => 'latest', | ||
provider => 'pip', | ||
require => Class['awscli::deps'], | ||
} | ||
} |
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,12 @@ | ||
require 'spec_helper' | ||
|
||
describe 'awscli', :type => 'class' do | ||
let(:facts) { { :osfamily => 'Debian' } } | ||
|
||
it { should contain_class('awscli::deps') } | ||
|
||
it do should contain_package('awscli').with( | ||
'ensure' => 'latest', | ||
'provider' => 'pip', | ||
) end | ||
end |
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 @@ | ||
../../../../manifests |
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 @@ | ||
require 'rspec-puppet' | ||
|
||
fixture_path = File.expand_path(File.join(__FILE__, '..', 'fixtures')) | ||
|
||
RSpec.configure do |c| | ||
c.module_path = File.join(fixture_path, 'modules') | ||
c.manifest_dir = File.join(fixture_path, 'manifests') | ||
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,12 @@ | ||
# The baseline for module testing used by Puppet Labs is that each manifest | ||
# should have a corresponding test manifest that declares that class or defined | ||
# type. | ||
# | ||
# Tests are then run by using puppet apply --noop (to check for compilation | ||
# errors and view a log of events) or by fully applying the test in a virtual | ||
# environment (to compare the resulting system state to the desired state). | ||
# | ||
# Learn more about module testing here: | ||
# http://docs.puppetlabs.com/guides/tests_smoke.html | ||
# | ||
include awscli |
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 @@ | ||
class { 'awscli': } |