Skip to content
Snippets Groups Projects
Commit bed76d4c authored by Dennis Ahrens's avatar Dennis Ahrens
Browse files

Initial commit

parents
No related branches found
No related tags found
No related merge requests found
.vagrant/
state_verbose: True
file_client: local
gitfs_provider: gitpython
fileserver_backend:
- roots
- git
# Use this if you wanne use gitfs formulas!
#gitfs_remotes:
# - https://github.com/saltstack-formulas/node-formula.git
../../pillar.example
\ No newline at end of file
# ensure that our pillar.example gets loaded, when highstating the box.
base:
'*':
- hshbase
../../hshbase/
\ No newline at end of file
base:
'*':
- hshbase
# hshbase
Basic server configuration, used for all unix based servers at HsH.
## States
* apt
* iptables
* locale
* open-vm-tools
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
# lets us debian jessie amd64 as base.
config.vm.box = "debian/jessie64"
# sync working dir; ignore folders that were created by node and grunt
config.vm.synced_folder ".", "/vagrant", type: "rsync",
rsync__exclude: [".git/",]
# install those to be able to use gitfs for node formula
config.vm.provision :shell, :inline => "sudo apt-get -y install git-core"
config.vm.provision :shell, :inline => "sudo apt-get -y install python-setuptools"
config.vm.provision :shell, :inline => "sudo easy_install GitPython"
config.vm.provision :shell, :inline => "ln -s /vagrant/.saltstack/salt /srv/"
config.vm.provision :shell, :inline => "ln -s /vagrant/.saltstack/pillar /srv/"
config.vm.provision :salt do |salt|
# Workaround for:
# Copying salt minion config to /etc/salt
# Failed to upload a file to the guest VM via SCP due to a permissions
# error. [...]; @see:
# https://github.com/mitchellh/vagrant/issues/5973#issuecomment-137276605
salt.bootstrap_options = '-F -c /tmp/ -P'
salt.masterless = true
salt.minion_config = ".saltstack/minion"
salt.run_highstate = true
salt.verbose = true
end
# forward some service port from guest to host for testing?!
# config.vm.network "forwarded_port", guest:80, host:8888, host_ip:"localhost"
end
{% from "hshbase/map.jinja" import config with context %}
{% set proxy_address = {{ config.apt.proxy_address | default('http://apt-proxy.it.hs-hannover.de:8080') }} %}
{% if grains['os'] == 'FreeBSD' %}
hsh_freebsd_apt_proxy_folder:
file.directory:
- name: /usr/local/etc/pkg/repos
- makedirs: True
- mode: 755
- user: root
- group: wheel
hsh_freebsd_apt_proxy:
file.managed:
- name: /usr/local/etc/pkg/repos/FreeBSD.conf
- contents: 'FreeBSD { url: "pkg+http://apt-proxy.it.hs-hannover.de:8080/pkg.FreeBSD.org/${ABI}/latest" }'
- mode: 644
- user: root
- group: wheel
{% elif grains['os'] == 'Debian' or grains['os'] == 'Ubuntu' %}
foobar_test:
cmd.run:
- name: echo "{{ config.apt.proxy_address }}"
# hsh_debian_apt_proxy:
# file.managed:
# - name: /etc/apt/apt.conf.d/02proxy
# - contents: 'Acquire::http { Proxy "http://apt-proxy.it.hs-hannover.de:8080"; };'
# - mode: 644
# - user: root
# - group: root
{% endif %}
hshbase:
apt:
proxy: True
proxy_address: http://apt-proxy.it.hs-hannover.de:8080
include:
- hshbase.apt
echo "hshbase is under construction":
cmd.run
{% set base_config = salt['pillar.get']('hshbase') %}
{% import_yaml 'hshbase/defaults.yaml' as default_config %}
{% do default_config.update(base_config) %}
{% set config = default_config %}
hshbase:
apt:
proxy: True
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment