From 8c10d8c7762d82a9e941eec8c6e21a46df9ff04c Mon Sep 17 00:00:00 2001 From: Kevin Bowling Date: Wed, 1 Oct 2014 23:44:48 -0700 Subject: [PATCH 1/3] Pillar example whitespace --- pillar.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pillar.example b/pillar.example index 3374e12..f12d7b6 100644 --- a/pillar.example +++ b/pillar.example @@ -13,7 +13,7 @@ salt: module_config: test: True test.foo: foo - test.bar: + test.bar: - baz - quo test.baz: From b6d78a415d2d24298c5b293cc699211ea9990553 Mon Sep 17 00:00:00 2001 From: Kevin Bowling Date: Wed, 1 Oct 2014 23:54:30 -0700 Subject: [PATCH 2/3] Add FreeBSD to the package-map --- salt/package-map.jinja | 68 ++++++++++++++++++++++-------------------- 1 file changed, 36 insertions(+), 32 deletions(-) diff --git a/salt/package-map.jinja b/salt/package-map.jinja index e268b92..18aba07 100644 --- a/salt/package-map.jinja +++ b/salt/package-map.jinja @@ -1,36 +1,40 @@ {% set package_table = { - 'Debian': {'salt-master': 'salt-master', - 'salt-minion': 'salt-minion', - 'salt-syndic': 'salt-syndic', - 'salt-cloud': 'salt-cloud'}, - 'Ubuntu': {'salt-master': 'salt-master', - 'salt-minion': 'salt-minion', - 'salt-syndic': 'salt-syndic', - 'salt-cloud': 'salt-cloud'}, - 'CentOS': {'salt-master': 'salt-master', - 'salt-minion': 'salt-minion', - 'salt-syndic': 'salt-syndic', - 'salt-cloud': 'salt-cloud'}, - 'Amazon': {'salt-master': 'salt-master', - 'salt-minion': 'salt-minion', - 'salt-syndic': 'salt-syndic', - 'salt-cloud': 'salt-cloud'}, - 'Fedora': {'salt-master': 'salt-master', - 'salt-minion': 'salt-minion', - 'salt-syndic': 'salt-syndic', - 'salt-cloud': 'salt-cloud'}, - 'RedHat': {'salt-master': 'salt-master', - 'salt-minion': 'salt-minion', - 'salt-syndic': 'salt-syndic', - 'salt-cloud': 'salt-cloud'}, - 'Gentoo': {'salt-master': 'app-admin/salt', - 'salt-minion': 'app-admin/salt', - 'salt-syndic': 'app-admin/salt', - 'salt-cloud': 'app-admin/salt'}, - 'Arch': {'salt-master': 'salt', - 'salt-minion': 'salt', - 'salt-syndic': 'salt', - 'salt-cloud': 'salt'} + 'Debian': {'salt-master': 'salt-master', + 'salt-minion': 'salt-minion', + 'salt-syndic': 'salt-syndic', + 'salt-cloud': 'salt-cloud'}, + 'Ubuntu': {'salt-master': 'salt-master', + 'salt-minion': 'salt-minion', + 'salt-syndic': 'salt-syndic', + 'salt-cloud': 'salt-cloud'}, + 'CentOS': {'salt-master': 'salt-master', + 'salt-minion': 'salt-minion', + 'salt-syndic': 'salt-syndic', + 'salt-cloud': 'salt-cloud'}, + 'Amazon': {'salt-master': 'salt-master', + 'salt-minion': 'salt-minion', + 'salt-syndic': 'salt-syndic', + 'salt-cloud': 'salt-cloud'}, + 'Fedora': {'salt-master': 'salt-master', + 'salt-minion': 'salt-minion', + 'salt-syndic': 'salt-syndic', + 'salt-cloud': 'salt-cloud'}, + 'RedHat': {'salt-master': 'salt-master', + 'salt-minion': 'salt-minion', + 'salt-syndic': 'salt-syndic', + 'salt-cloud': 'salt-cloud'}, + 'Gentoo': {'salt-master': 'app-admin/salt', + 'salt-minion': 'app-admin/salt', + 'salt-syndic': 'app-admin/salt', + 'salt-cloud': 'app-admin/salt'}, + 'Arch': {'salt-master': 'salt', + 'salt-minion': 'salt', + 'salt-syndic': 'salt', + 'salt-cloud': 'salt'}, + 'FreeBSD': {'salt-master': 'py27-salt', + 'salt-minion': 'py27-salt', + 'salt-syndic': 'py27-salt', + 'salt-cloud': 'py27-salt'} } %} {% if 'package_table' in pillar %} From 4675d68bd818e267799acb1ef8015b8f1424b8f6 Mon Sep 17 00:00:00 2001 From: Kevin Bowling Date: Thu, 2 Oct 2014 00:20:29 -0700 Subject: [PATCH 3/3] Initial FreeBSD support --- salt/master.sls | 3 ++- salt/minion.sls | 3 ++- salt/package-map.jinja | 6 +++++- salt/syndic.sls | 4 ++-- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/salt/master.sls b/salt/master.sls index e9e8c3f..d4a62f4 100644 --- a/salt/master.sls +++ b/salt/master.sls @@ -4,11 +4,12 @@ salt-master: pkg.installed: - name: {{ pkgs['salt-master'] }} file.managed: - - name: /etc/salt/master.d/master.conf + - name: {{ pkgs.get('config-path', '/etc/salt') }}/master.d/master.conf - template: jinja - source: salt://salt/files/master service.running: - enable: True + - name: {{ pkgs.get('master-service', 'salt-master') }} - watch: - pkg: salt-master - file: salt-master diff --git a/salt/minion.sls b/salt/minion.sls index d6f587f..3c8412b 100644 --- a/salt/minion.sls +++ b/salt/minion.sls @@ -4,11 +4,12 @@ salt-minion: pkg.installed: - name: {{ pkgs['salt-minion'] }} file.managed: - - name: /etc/salt/minion.d/minion.conf + - name: {{ pkgs.get('config-path', '/etc/salt') }}/minion.d/minion.conf - template: jinja - source: salt://salt/files/minion service.running: - enable: True + - name: {{ pkgs.get('minion-service', 'salt-minion') }} - watch: - pkg: salt-minion - file: salt-minion diff --git a/salt/package-map.jinja b/salt/package-map.jinja index 18aba07..243d12d 100644 --- a/salt/package-map.jinja +++ b/salt/package-map.jinja @@ -34,7 +34,11 @@ 'FreeBSD': {'salt-master': 'py27-salt', 'salt-minion': 'py27-salt', 'salt-syndic': 'py27-salt', - 'salt-cloud': 'py27-salt'} + 'salt-cloud': 'py27-salt', + 'config-path': '/usr/local/etc/salt', + 'minion-service': 'salt_minion', + 'master-service': 'salt_master', + 'syndic-service': 'salt_syndic'} } %} {% if 'package_table' in pillar %} diff --git a/salt/syndic.sls b/salt/syndic.sls index a070f76..0804d98 100644 --- a/salt/syndic.sls +++ b/salt/syndic.sls @@ -9,7 +9,7 @@ salt-syndic: service: - running - require: - - service: salt-master + - service: {{ pkgs.get('syndic-service', 'salt-master') }} - watch: - pkg: salt-master - - file: /etc/salt/master \ No newline at end of file + - file: {{ pkgs.get('config-path', '/etc/salt') }}/master