<commit_before>include:
  - repos
  - suse_manager_server.firewall
  - suse_manager_server.postgres
  - suse_manager_server.tomcat
  - suse_manager_server.taskomatic
  - suse_manager_server.spacewalk-search
  - suse_manager_server.rhn
  - suse_manager_server.prometheus
  - suse_manager_server.initial_content
  - suse_manager_server.iss
  - suse_manager_server.testsuite
  - suse_manager_server.pts
  - suse_manager_server.filebeat
  - suse_manager_server.salt_master
  - suse_manager_server.apparmor
  - suse_manager_server.tcpdump

# HACK: make sure we do not run into a JVM bug in the openSUSE 42.3 outdated package
{% if grains['osfullname'] == 'Leap' and grains['osrelease'] == '42.3' %}
java-1_8_0-openjdk-headless:
  pkg.latest:
    - require:
      - sls: repos
{% endif %}

suse_manager_packages:
  pkg.latest:
    - refresh: True
    {% if grains['osfullname'] == 'Leap' %}
    - name: patterns-uyuni_server
    {% else %}
    - name: patterns-suma_server
    {% endif %}
    - require:
      - sls: repos
      - sls: suse_manager_server.firewall

environment_setup_script:
  file.managed:
    - name: /root/setup_env.sh
    - source: salt://suse_manager_server/setup_env.sh
    - template: jinja
<commit_msg>Fix baseproduct for SUSE Manager 4<commit_after>include:
  - repos
  - suse_manager_server.firewall
  - suse_manager_server.postgres
  - suse_manager_server.tomcat
  - suse_manager_server.taskomatic
  - suse_manager_server.spacewalk-search
  - suse_manager_server.rhn
  - suse_manager_server.prometheus
  - suse_manager_server.initial_content
  - suse_manager_server.iss
  - suse_manager_server.testsuite
  - suse_manager_server.pts
  - suse_manager_server.filebeat
  - suse_manager_server.salt_master
  - suse_manager_server.apparmor
  - suse_manager_server.tcpdump

# HACK: make sure we do not run into a JVM bug in the openSUSE 42.3 outdated package
{% if grains['osfullname'] == 'Leap' and grains['osrelease'] == '42.3' %}
java-1_8_0-openjdk-headless:
  pkg.latest:
    - require:
      - sls: repos
{% endif %}

suse_manager_packages:
  pkg.latest:
    - refresh: True
    {% if grains['osfullname'] == 'Leap' %}
    - name: patterns-uyuni_server
    {% else %}
    - name: patterns-suma_server
    {% endif %}
    - require:
      - sls: repos
      - sls: suse_manager_server.firewall

{% if '4' in grains['product_version'] and grains['osfullname'] != 'Leap' %}
baseproduct_link:
  file.symlink:
    - name: /etc/products.d/baseproduct
    - target: SUSE-Manager-Server.prod
    - require:
      - pkg: suse_manager_packages
{% endif %}

environment_setup_script:
  file.managed:
    - name: /root/setup_env.sh
    - source: salt://suse_manager_server/setup_env.sh
    - template: jinja

{'fraction_non_alphanumeric': 0.10972017673048601, 'fraction_numerical': 0.007363770250368188, 'mean_word_length': 3.3893376413570273, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5088092', 'n_tokens_mistral': 1038, 'n_tokens_neox': 972, 'n_words': 166}