diff --git a/map.jinja b/map.jinja --- a/map.jinja +++ b/map.jinja @@ -4,12 +4,14 @@ 'bin': '/usr/bin', 'include': '/usr/include', 'lib': '/usr/lib', + 'man': '/usr/share/man', }, 'FreeBSD' : { 'etc': '/usr/local/etc', 'bin': '/usr/local/bin', 'include': '/usr/local/include', 'lib': '/usr/local/lib', + 'man': '/usr/local/man', }, }, default='Debian') %} diff --git a/roles/saltmaster/salt-wrapper/files/salt-wrapper.conf b/roles/saltmaster/salt-wrapper/files/salt-wrapper.conf new file mode 100644 --- /dev/null +++ b/roles/saltmaster/salt-wrapper/files/salt-wrapper.conf @@ -0,0 +1,21 @@ +{ + "comments": [ + "This file is managed by our rOPS SaltStack repository.", + + "Changes to this file may cause incorrect behavior", + "and will be lost if the state is redeployed.", + + "Source file: roles/saltmaster/salt-wrapper/files/salt-wrapper.conf" + ], + + "roots": [ + { + "config": "/usr/local/etc/salt-woodscloud", + "states": "/opt/woodscloud-operations" + }, + { + "config": "/usr/local/etc/salt", + "states": "/opt/nasqueron-operations" + } + ] +} diff --git a/roles/saltmaster/salt-wrapper/init.sls b/roles/saltmaster/salt-wrapper/init.sls new file mode 100644 --- /dev/null +++ b/roles/saltmaster/salt-wrapper/init.sls @@ -0,0 +1,29 @@ +# ------------------------------------------------------------- +# Salt — Salt master configuration +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Project: Nasqueron +# Created: 2017-10-04 +# License: Trivial work, not eligible to copyright +# ------------------------------------------------------------- + +{% from "map.jinja" import dirs with context %} + +# ------------------------------------------------------------- +# Wrapper binaries +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +{{ dirs.bin }}/salt-wrapper: + file.managed: + - source: salt://software/salt-wrapper/salt-wrapper.sh + +{{ dirs.bin }}/salt-get-config-dir: + file.managed: + - source: salt://software/salt-wrapper/salt-get-config-dir.py + +# ------------------------------------------------------------- +# Wrapper configuration +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +{{ dirs.etc }}/salt-wrapper.conf: + file.managed: + - source: salt://roles/saltmaster/salt-wrapper/files/salt-wrapper.conf diff --git a/top.sls b/top.sls --- a/top.sls +++ b/top.sls @@ -18,6 +18,7 @@ - roles/core/letsencrypt 'local': - roles/saltmaster/sudo + - roles/saltmaster/salt-wrapper 'dwellers.nasqueron.org': - roles/paas-docker/docker - roles/paas-lxc/lxc