Skip to content

Commit

Permalink
fix(freebsd): update to provide support for most recent versions
Browse files Browse the repository at this point in the history
  • Loading branch information
myii committed Mar 30, 2021
1 parent bbd7286 commit 24ebbb4
Show file tree
Hide file tree
Showing 6 changed files with 251 additions and 0 deletions.
3 changes: 3 additions & 0 deletions salt/master.sls
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions salt/minion.sls
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
11 changes: 11 additions & 0 deletions salt/osmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
112 changes: 112 additions & 0 deletions test/integration/v3002-py3/files/_mapdata/freebsd-11.yaml
Original file line number Diff line number Diff line change
@@ -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: ''
112 changes: 112 additions & 0 deletions test/integration/v3002-py3/files/_mapdata/freebsd-12.yaml
Original file line number Diff line number Diff line change
@@ -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: ''
7 changes: 7 additions & 0 deletions test/salt/pillar/v3002-py3.sls
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 24ebbb4

Please sign in to comment.