diff --git a/file_roots/install/iscsi.sls b/file_roots/install/iscsi.sls index 7c50ac9..e0fdc5f 100644 --- a/file_roots/install/iscsi.sls +++ b/file_roots/install/iscsi.sls @@ -1,3 +1,6 @@ base: '*': + {% if grains.os_family == 'Arch' %} + - users #we need iscsimake user on archlinux + {%- endif %} - iscsi diff --git a/file_roots/install/salt.sls b/file_roots/install/salt.sls index 10870f6..aa73bac 100644 --- a/file_roots/install/salt.sls +++ b/file_roots/install/salt.sls @@ -1,7 +1,3 @@ base: '*': - {%- if grains.os_family not in ('MacOS', 'Arch') %} - - salt.pkgrepo - {%- endif %} - - salt.minion - - salt.formulas + - salt diff --git a/pillar_roots/saltstack-formulas/iscsi.sls b/pillar_roots/saltstack-formulas/iscsi.sls new file mode 100644 index 0000000..5260e0c --- /dev/null +++ b/pillar_roots/saltstack-formulas/iscsi.sls @@ -0,0 +1,14 @@ + {% if grains.os == 'Arch' %} +users: ##iscsi-formula needs this user + iscsimake: + sudouser: True + shell: /bin/bash + empty_password: True + home: /home/iscsimake + createhome: True + optional_groups: + - wheel + - root + sudo_rules: + - 'ALL=(ALL) ALL' + {% endif %} diff --git a/pillar_roots/saltstack-formulas/postgres.sls b/pillar_roots/saltstack-formulas/postgres.sls index c703634..d76a616 100644 --- a/pillar_roots/saltstack-formulas/postgres.sls +++ b/pillar_roots/saltstack-formulas/postgres.sls @@ -6,8 +6,10 @@ postgres: # Set False to use distro packaged postgresql. # Set True to use upstream postgresql.org repo for YUM/APT/ZYPP use_upstream_repo: False + {%- if grains.os_family not in ('FreeBSD',) %} pkgs_extra: - postgresql-contrib + {%- endif %} #following is used by 'remove' states. upstream: @@ -67,7 +69,7 @@ postgres: config_backup: ".backup@{{ salt['status.time']('%y-%m-%d_%H:%M:%S') }}" {%- endif %} - {%- if grains['init'] == 'unknown' %} + {%- if 'init' in grains and grains['init'] == 'unknown' %} # If Salt is unable to detect init system running in the scope of state run, # probably we are trying to bake a container/VM image with PostgreSQL. diff --git a/salter.sh b/salter.sh index 33c59fe..41a5af5 100755 --- a/salter.sh +++ b/salter.sh @@ -514,7 +514,7 @@ developer-definitions() { fork['uri']="https://github.com" fork['entity']="noelmcloughlin" fork['branch']="fixes" - fork['solutions']="salter packages-formula golang-formula postgres-formula" + fork['solutions']="salter packages-formula golang-formula postgres-formula salt-formula" } solution-definitions() {