initial import
This commit is contained in:
commit
06ec94a862
|
@ -0,0 +1,2 @@
|
|||
.kitchen
|
||||
Gemfile.lock
|
|
@ -0,0 +1,27 @@
|
|||
driver:
|
||||
name: docker
|
||||
|
||||
platforms:
|
||||
- name: centos-7
|
||||
driver_config:
|
||||
image: corux/centos7-salt
|
||||
- name: debian-8
|
||||
- name: fedora-latest
|
||||
|
||||
provisioner:
|
||||
name: salt_solo
|
||||
formula: vagrant
|
||||
pillars-from-files:
|
||||
vagrant.sls: pillar.example
|
||||
pillars:
|
||||
top.sls:
|
||||
base:
|
||||
"*":
|
||||
- vagrant
|
||||
state_top:
|
||||
base:
|
||||
"*":
|
||||
- vagrant
|
||||
|
||||
suites:
|
||||
- name: default
|
|
@ -0,0 +1,6 @@
|
|||
sudo: required
|
||||
services:
|
||||
- docker
|
||||
|
||||
script:
|
||||
- kitchen test
|
|
@ -0,0 +1,7 @@
|
|||
name: vagrant
|
||||
os: CentOS, Fedora, Debian
|
||||
os_family: RedHat, Debian
|
||||
version: 201602
|
||||
release: 1
|
||||
summary: Formula for installing Vagrant
|
||||
description: Formula for installing Vagrant
|
|
@ -0,0 +1,5 @@
|
|||
source "https://rubygems.org"
|
||||
|
||||
gem "test-kitchen"
|
||||
gem "kitchen-docker"
|
||||
gem "kitchen-salt"
|
|
@ -0,0 +1,19 @@
|
|||
===============
|
||||
vagrant-formula
|
||||
===============
|
||||
|
||||
.. image:: https://travis-ci.org/corux/vagrant-formula.svg?branch=master
|
||||
:target: https://travis-ci.org/corux/vagrant-formula
|
||||
|
||||
Installs Vagrant.
|
||||
|
||||
Available states
|
||||
================
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
|
||||
``vagrant``
|
||||
-----------
|
||||
|
||||
Installs Vagrant.
|
|
@ -0,0 +1,3 @@
|
|||
vagrant:
|
||||
plugins:
|
||||
- vagrant-aws
|
|
@ -0,0 +1,11 @@
|
|||
require 'serverspec'
|
||||
|
||||
set :backend, :exec
|
||||
|
||||
describe command("which vagrant") do
|
||||
its(:exit_status) { should eq 0 }
|
||||
end
|
||||
|
||||
describe command("vagrant plugin list | grep vagrant-aws") do
|
||||
its(:exit_status) { should eq 0 }
|
||||
end
|
|
@ -0,0 +1,2 @@
|
|||
vagrant:
|
||||
version: 1.8.1
|
|
@ -0,0 +1,13 @@
|
|||
{% from "vagrant/map.jinja" import vagrant with context %}
|
||||
|
||||
vagrant:
|
||||
pkg.installed:
|
||||
- sources:
|
||||
- vagrant: {{ vagrant.url }}
|
||||
|
||||
{% for plugin in vagrant.get('plugins', []) %}
|
||||
vagrant-plugin-{{ plugin }}:
|
||||
cmd.run:
|
||||
- name: "vagrant plugin install '{{ plugin }}'"
|
||||
- unless: "vagrant plugin list | grep '{{ plugin }}'"
|
||||
{% endfor %}
|
|
@ -0,0 +1,12 @@
|
|||
{% import_yaml 'vagrant/defaults.yaml' as default_settings %}
|
||||
{% set vagrant = salt['pillar.get']('vagrant', default=default_settings.get('vagrant'), merge=True) %}
|
||||
|
||||
{% set baseurl = 'https://releases.hashicorp.com/vagrant/' ~ vagrant.version ~ '/vagrant_' ~ vagrant.version ~ '_x86_64' %}
|
||||
{% set vagrant = salt['grains.filter_by']({
|
||||
'RedHat': {
|
||||
'url': baseurl ~ '.rpm'
|
||||
},
|
||||
'Debian': {
|
||||
'url': baseurl ~ '.deb'
|
||||
}
|
||||
}, grain = 'os_family', merge=vagrant) %}
|
Loading…
Reference in New Issue