<commit_before>###########
# CONFIG changes - e g to switch to external database
###########

# TODO: This should be parameterized or done with regex
# koha config from template
/etc/koha/sites/{{ pillar['koha']['instance'] }}/koha-conf.xml:
  file.managed:
    - source: salt://koha/files/koha-conf.xml.tmpl
    - group: {{ pillar['koha']['instance'] }}-koha
    - user: {{ pillar['koha']['instance'] }}-koha
    - template: jinja

/etc/koha/sites/{{ pillar['koha']['instance'] }}/log4perl.conf:
  file.managed:
    - source: salt://koha/files/log4perl.conf
    - group: {{ pillar['koha']['instance'] }}-koha
    - user: {{ pillar['koha']['instance'] }}-koha
    - template: jinja

# zebra internal password
config_zebrapass:
  file.managed:
    - name: /etc/koha/sites/{{ pillar['koha']['instance'] }}/zebra.passwd
    - stateful: True
    - source: salt://koha/files/zebra.passwd.tmpl
    - group: {{ pillar['koha']['instance'] }}-koha
    - user: {{ pillar['koha']['instance'] }}-koha
    - template: jinja

config_apacheinstance:
  file.managed:
    - name: /etc/apache2/sites-available/{{ pillar['koha']['instance'] }}.conf
    - stateful: True
    - source: salt://koha/files/apache.tmpl
    - template: jinja
    - context:
      OpacPort: 8080
      IntraPort: 8081
      ServerName: {{ pillar['koha']['instance'] }}

#########
# PLACK IN DOCKER SOCKET WORKAROUND
#########

/usr/share/perl5/Authen/CAS/Client/Response/Failure.pm:
  file.managed:
    - source: salt://koha/files/Authen_CAS_Client_Response_Failure.pm
    - makedirs: True

/usr/share/perl5/Authen/CAS/Client/Response/Success.pm:
  file.managed:
    - source: salt://koha/files/Authen_CAS_Client_Response_Success.pm
    - makedirs: True

#########
# END PLACK IN DOCKER SOCKET WORKAROUND
#########

apache2:
  service.running:
    - watch:
      - file: config_apacheinstance

koha-common:
  service.running:
    - watch:
      - file: config_zebrapass
<commit_msg>Correct description<commit_after>###########
# CONFIG changes - e g to switch to external database
###########

# TODO: This should be parameterized or done with regex
# koha config from template
/etc/koha/sites/{{ pillar['koha']['instance'] }}/koha-conf.xml:
  file.managed:
    - source: salt://koha/files/koha-conf.xml.tmpl
    - group: {{ pillar['koha']['instance'] }}-koha
    - user: {{ pillar['koha']['instance'] }}-koha
    - template: jinja

/etc/koha/sites/{{ pillar['koha']['instance'] }}/log4perl.conf:
  file.managed:
    - source: salt://koha/files/log4perl.conf
    - group: {{ pillar['koha']['instance'] }}-koha
    - user: {{ pillar['koha']['instance'] }}-koha
    - template: jinja

# zebra internal password
config_zebrapass:
  file.managed:
    - name: /etc/koha/sites/{{ pillar['koha']['instance'] }}/zebra.passwd
    - stateful: True
    - source: salt://koha/files/zebra.passwd.tmpl
    - group: {{ pillar['koha']['instance'] }}-koha
    - user: {{ pillar['koha']['instance'] }}-koha
    - template: jinja

config_apacheinstance:
  file.managed:
    - name: /etc/apache2/sites-available/{{ pillar['koha']['instance'] }}.conf
    - stateful: True
    - source: salt://koha/files/apache.tmpl
    - template: jinja
    - context:
      OpacPort: 8080
      IntraPort: 8081
      ServerName: {{ pillar['koha']['instance'] }}

#########
# PLACK IN DOCKER CAS WORKAROUND
#########

/usr/share/perl5/Authen/CAS/Client/Response/Failure.pm:
  file.managed:
    - source: salt://koha/files/Authen_CAS_Client_Response_Failure.pm
    - makedirs: True

/usr/share/perl5/Authen/CAS/Client/Response/Success.pm:
  file.managed:
    - source: salt://koha/files/Authen_CAS_Client_Response_Success.pm
    - makedirs: True

#########
# END PLACK IN DOCKER CAS WORKAROUND
#########

apache2:
  service.running:
    - watch:
      - file: config_apacheinstance

koha-common:
  service.running:
    - watch:
      - file: config_zebrapass

{'fraction_non_alphanumeric': 0.19133574007220217, 'fraction_numerical': 0.007220216606498195, 'mean_word_length': 3.338926174496644, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '6397168', 'n_tokens_mistral': 1481, 'n_tokens_neox': 1337, 'n_words': 249}