diff --git a/icinga2/init.sls b/icinga2/init.sls index ece989d..798c107 100644 --- a/icinga2/init.sls +++ b/icinga2/init.sls @@ -28,6 +28,11 @@ icingaweb2_vhost: - watch_by: - service: nginx +/etc/icinga2/conf.d: + git.cloned: + - name: ssh://keiran5@git.keiran.us:9022/config-mgmt/icinga2-conf.d.git + - target: /etc/icinga2/conf.d + # icingacli setup config directory # icingacli setup token create # icingacli setup token show diff --git a/restic/client.sls b/restic/client.sls new file mode 100644 index 0000000..d030471 --- /dev/null +++ b/restic/client.sls @@ -0,0 +1,7 @@ +{% from "restic/map.jinja" import url with context %} + +'download restic': + cmd.run: + - name: 'wget {{url}} -O - | bzip2 -cd > /bin/restic ; chmod +x /bin/restic' + - unless: stat /bin/restic + diff --git a/restic/map.jinja b/restic/map.jinja new file mode 100644 index 0000000..47fe697 --- /dev/null +++ b/restic/map.jinja @@ -0,0 +1,6 @@ + +{% if salt.grains.get('cpuarch').startswith('arm') %} +{% set url = 'https://github.com/restic/restic/releases/download/v0.9.6/restic_0.9.6_linux_arm.bz2' %} +{% else %} +{% set url = 'https://github.com/restic/restic/releases/download/v0.9.6/restic_0.9.6_linux_amd64.bz2' %} +{% endif %} diff --git a/samba/files/smb.conf.jinja b/samba/files/smb.conf.jinja index 167df90..2c737b7 100644 --- a/samba/files/smb.conf.jinja +++ b/samba/files/smb.conf.jinja @@ -25,10 +25,10 @@ valid users = %S {% endif %} -{% for name, path in salt.pillar.get('samba:shares', {}).items() %} +{% for name, conf in salt.pillar.get('samba:shares', {}).items() %} [{{ name }}] - path = {{ path }} - valid users = @sambashare - read only = yes + path = {{ conf['path'] }} + valid users = {{ conf['users'] }} + read only = {{ conf['readonly'] }} {% endfor %} diff --git a/top.sls b/top.sls index fc09dff..f008682 100644 --- a/top.sls +++ b/top.sls @@ -10,4 +10,5 @@ - icinga2 - nginx - restic.server + - restic.client - samba