diff --git a/salt/master.sls b/salt/master.sls index 13cc5a8..81902df 100644 --- a/salt/master.sls +++ b/salt/master.sls @@ -27,6 +27,9 @@ salt-master: {%- if salt_settings.version is defined %} - version: {{ salt_settings.version }} {%- endif %} + {%- if grains.os_family == 'FreeBSD' %} + - unless: pkg info | grep {{ salt_settings.salt_master }} + {%- endif %} {% if salt_settings.master_service_details.state != 'ignore' %} - require_in: - service: salt-master diff --git a/salt/minion.sls b/salt/minion.sls index a672aaf..676ce42 100644 --- a/salt/minion.sls +++ b/salt/minion.sls @@ -71,6 +71,9 @@ salt-minion: {%- if salt_settings.version %} - version: {{ salt_settings.version }} {%- endif %} + {%- if grains.os_family == 'FreeBSD' %} + - unless: pkg info | grep {{ salt_settings.salt_master }} + {%- endif %} {% if salt_settings.minion_service_details.state != 'ignore' %} - require_in: - service: salt-minion @@ -97,6 +100,9 @@ salt-minion: service.{{ salt_settings.minion_service_details.state }}: - enable: {{ salt_settings.minion_service_details.enabled }} - name: {{ salt_settings.minion_service }} + {%- if grains.os_family == 'FreeBSD' %} + - retry: {{ salt_settings.retry_options | json }} + {%- endif %} - watch: - file: remove-old-minion-conf-file - order: last diff --git a/salt/osmap.yaml b/salt/osmap.yaml index 3eb0b5a..589127c 100644 --- a/salt/osmap.yaml +++ b/salt/osmap.yaml @@ -63,5 +63,16 @@ MacOS: salt_master_macos_plist_hash: 8435331b2d48ca8f0759f216e5b15ec9171a4216b1441328c732c6906728b7c9 salt_minion_macos_plist_hash: 26b33da12e0d8960ee96b488c8352002c22a377c19bf3df3f986a1e49eca8b20 +FreeBSD: + salt_master: py37-salt-3002.6 + salt_minion: py37-salt-3002.6 + salt_syndic: py37-salt-3002.6 + salt_cloud: py37-salt-3002.6 + salt_api: py37-salt-3002.6 + salt_ssh: py37-salt-3002.6 + python_git: py37-GitPython-3.1.11 + pygit2: py37-pygit2-1.3.0 + python_dulwich: py37-dulwich-0.19.16 + Windows: parallel: false # not supported on windows/cygwin diff --git a/test/integration/v3002-py3/files/_mapdata/freebsd-11.yaml b/test/integration/v3002-py3/files/_mapdata/freebsd-11.yaml new file mode 100644 index 0000000..e50ae84 --- /dev/null +++ b/test/integration/v3002-py3/files/_mapdata/freebsd-11.yaml @@ -0,0 +1,112 @@ +# yamllint disable rule:indentation rule:line-length +# FreeBSD-12 +--- +values: + formulas_settings: + checkout_orig_branch: false + git_opts: + default: + basedir: /srv/formulas + baseurl: https://github.com/saltstack-formulas + options: + output_loglevel: quiet + rev: master + update: false + list: {} + salt_settings: + api_service: salt_api + api_service_details: + enabled: true + state: running + clean_config_d_dir: true + cloud: + template_sources: + maps: salt://salt/files/cloud.maps.d + profiles: salt://salt/files/cloud.profiles.d + providers: salt://salt/files/cloud.providers.d + config_path: /usr/local/etc/salt + gitfs: + dulwich: + install_from_source: true + gitpython: + install_from_source: false + pygit2: + git: + install_from_package: git + require_state: false + install_from_source: true + libgit2: + build_parent_dir: /usr/src/ + download_hash: 683d1164e361e2a0a8d52652840e2340 + install_from_source: true + version: 0.23.0 + version: 0.23.0 + install_packages: true + master: + ext_pillar: + - cmd_yaml: cat /etc/salt/yaml + - stack: + - /path/to/stack1.cfg + - /path/to/stack2.cfg + - reclass: + inventory_base_uri: /etc/reclass + file_roots: + base: + - /srv/salt + fileserver_backend: + - rootfs + gitfs_provider: gitpython + pillar_roots: + base: + - /srv/pillar + master_config_use_TOFS: false + master_remove_config: false + master_service: salt_master + master_service_details: + enabled: true + state: running + minion: + file_roots: + base: + - /srv/salt + fileserver_backend: + - rootfs + master: localhost + master_type: true + pillar_roots: + base: + - /srv/pillar + minion_config_use_TOFS: false + minion_remove_config: false + minion_service: salt_minion + minion_service_details: + enabled: true + state: running + parallel: true + pin_version: false + pkgrepo: '' + py_ver: py3 + pygit2: py37-pygit2-1.3.0 + python_dulwich: py37-dulwich-0.19.16 + python_git: py37-GitPython-3.1.11 + release: '3002' + restart_via_at: false + retry_options: + attempts: 5 + interval: 10 + splay: 10 + until: true + rootgroup: wheel + rootuser: root + salt_api: py37-salt-3002.6 + salt_cloud: py37-salt-3002.6 + salt_master: py37-salt-3002.6 + salt_master_macos_plist_hash: '' + salt_minion: py37-salt-3002.6 + salt_minion_macos_plist_hash: '' + salt_ssh: py37-salt-3002.6 + salt_syndic: py37-salt-3002.6 + ssh_roster: {} + syndic_service: salt_syndic + use_pip: false + version: '' diff --git a/test/integration/v3002-py3/files/_mapdata/freebsd-12.yaml b/test/integration/v3002-py3/files/_mapdata/freebsd-12.yaml new file mode 100644 index 0000000..e50ae84 --- /dev/null +++ b/test/integration/v3002-py3/files/_mapdata/freebsd-12.yaml @@ -0,0 +1,112 @@ +# yamllint disable rule:indentation rule:line-length +# FreeBSD-12 +--- +values: + formulas_settings: + checkout_orig_branch: false + git_opts: + default: + basedir: /srv/formulas + baseurl: https://github.com/saltstack-formulas + options: + output_loglevel: quiet + rev: master + update: false + list: {} + salt_settings: + api_service: salt_api + api_service_details: + enabled: true + state: running + clean_config_d_dir: true + cloud: + template_sources: + maps: salt://salt/files/cloud.maps.d + profiles: salt://salt/files/cloud.profiles.d + providers: salt://salt/files/cloud.providers.d + config_path: /usr/local/etc/salt + gitfs: + dulwich: + install_from_source: true + gitpython: + install_from_source: false + pygit2: + git: + install_from_package: git + require_state: false + install_from_source: true + libgit2: + build_parent_dir: /usr/src/ + download_hash: 683d1164e361e2a0a8d52652840e2340 + install_from_source: true + version: 0.23.0 + version: 0.23.0 + install_packages: true + master: + ext_pillar: + - cmd_yaml: cat /etc/salt/yaml + - stack: + - /path/to/stack1.cfg + - /path/to/stack2.cfg + - reclass: + inventory_base_uri: /etc/reclass + file_roots: + base: + - /srv/salt + fileserver_backend: + - rootfs + gitfs_provider: gitpython + pillar_roots: + base: + - /srv/pillar + master_config_use_TOFS: false + master_remove_config: false + master_service: salt_master + master_service_details: + enabled: true + state: running + minion: + file_roots: + base: + - /srv/salt + fileserver_backend: + - rootfs + master: localhost + master_type: true + pillar_roots: + base: + - /srv/pillar + minion_config_use_TOFS: false + minion_remove_config: false + minion_service: salt_minion + minion_service_details: + enabled: true + state: running + parallel: true + pin_version: false + pkgrepo: '' + py_ver: py3 + pygit2: py37-pygit2-1.3.0 + python_dulwich: py37-dulwich-0.19.16 + python_git: py37-GitPython-3.1.11 + release: '3002' + restart_via_at: false + retry_options: + attempts: 5 + interval: 10 + splay: 10 + until: true + rootgroup: wheel + rootuser: root + salt_api: py37-salt-3002.6 + salt_cloud: py37-salt-3002.6 + salt_master: py37-salt-3002.6 + salt_master_macos_plist_hash: '' + salt_minion: py37-salt-3002.6 + salt_minion_macos_plist_hash: '' + salt_ssh: py37-salt-3002.6 + salt_syndic: py37-salt-3002.6 + ssh_roster: {} + syndic_service: salt_syndic + use_pip: false + version: '' diff --git a/test/salt/pillar/v3002-py3.sls b/test/salt/pillar/v3002-py3.sls index aca5306..e9298e8 100644 --- a/test/salt/pillar/v3002-py3.sls +++ b/test/salt/pillar/v3002-py3.sls @@ -4,3 +4,10 @@ salt: release: '3002' py_ver: 'py3' + + # Override used for FreeBSD minion service + retry_options: + attempts: 5 + until: true + interval: 10 + splay: 10