<commit_before>include:
  - cuckoo.deps

genisoimage:
  pkg.installed

vmcloak_install:
  cmd.run:
    - name: pip install -U vmcloak
    - require:
      - cmd: pip

vmcloak_workingdir:
  file.directory:
    - name: {{ salt['pillar.get']('vmcloak:workingdir') }}
    - user: {{ salt['pillar.get']('cuckoo:user', 'cuckoo') }}
    - group: {{ salt['pillar.get']('cuckoo:user', 'cuckoo') }}
    - dir_mode: 755
    - file_mode: 644
    - recurse:
      - user
      - group
      - mode
    - makedirs: True
    - require:
      - user: cuckoo_user

winxp_iso:
  file.managed:
    - name: {{ salt['pillar.get']('vmcloak:workingdir') }}/winxp.iso
    - source: salt://cuckoo/files/winxp.iso
    - user: {{ salt['pillar.get']('cuckoo:user', 'cuckoo') }}
    - group: {{ salt['pillar.get']('cuckoo:user', 'cuckoo') }}
    - mode: 644
    - require:
      - file: vmcloak_workingdir

win7x64_iso:
  file.managed:
    - name: {{ salt['pillar.get']('vmcloak:workingdir') }}/win7x64.iso
    - source: salt://cuckoo/files/win7x64.iso
    - user: {{ salt['pillar.get']('cuckoo:user', 'cuckoo') }}
    - group: {{ salt['pillar.get']('cuckoo:user', 'cuckoo') }}
    - mode: 644
    - require:
      - file: vmcloak_workingdir

office2007.iso:
  file.managed:
    - name: {{ salt['pillar.get']('vmcloak:workingdir') }}/office2007.iso
    - source: salt://cuckoo/files/office2007.iso
    - user: {{ salt['pillar.get']('cuckoo:user', 'cuckoo') }}
    - group: {{ salt['pillar.get']('cuckoo:user', 'cuckoo') }}
    - mode: 644
    - require:
      - file: vmcloak_workingdir

office2010.iso:
  file.managed:
    - name: {{ salt['pillar.get']('vmcloak:workingdir') }}/office2010.iso
    - source: salt://cuckoo/files/office2010.iso
    - user: {{ salt['pillar.get']('cuckoo:user', 'cuckoo') }}
    - group: {{ salt['pillar.get']('cuckoo:user', 'cuckoo') }}
    - mode: 644
    - require:
      - file: vmcloak_workingdir

archive_zip:
  file.managed:
    - name: {{ salt['pillar.get']('vmcloak:workingdir') }}/archive.zip
    - source: salt://cuckoo/files/archive.zip
    - user: {{ salt['pillar.get']('cuckoo:user', 'cuckoo') }}
    - group: {{ salt['pillar.get']('cuckoo:user', 'cuckoo') }}
    - mode: 644
    - require:
      - file: vmcloak_workingdir

wallpaper_jpg:
  file.managed:
    - name: {{ salt['pillar.get']('vmcloak:workingdir') }}/wallpaper.jpg
    - source: salt://cuckoo/files/wallpaper.jpg
    - user: {{ salt['pillar.get']('cuckoo:user', 'cuckoo') }}
    - group: {{ salt['pillar.get']('cuckoo:user', 'cuckoo') }}
    - mode: 644
    - require:
      - file: vmcloak_workingdir

winxp_mount:
  mount.mounted:
    - name: {{ salt['pillar.get']('vmcloak:isomountdir') }}/winxp
    - device: {{ salt['pillar.get']('vmcloak:workingdir') }}/winxp.iso
    - fstype: iso9660
    - mkmnt: True
    - persist: False
    - opts: loop,ro
    - require:
      - file: winxp_iso

win7x64_mount:
  mount.mounted:
    - name: {{ salt['pillar.get']('vmcloak:isomountdir') }}/win7x64
    - device: {{ salt['pillar.get']('vmcloak:workingdir') }}/win7x64.iso
    - fstype: iso9660
    - mkmnt: True
    - persist: False
    - opts: loop,ro
    - require:
      - file: win7x64_iso

vmcloak_cleanup:
  file.absent:
    - name: {{ salt['pillar.get']('cuckoo:dir', '/srv/cuckoo') }}/.vmcloak

vmcloak_iptables:
  cmd.run:<commit_msg>only deploy/mount winxp/win7x64 iso if enabled<commit_after>include:
  - cuckoo.deps

genisoimage:
  pkg.installed

vmcloak_install:
  cmd.run:
    - name: pip install -U vmcloak
    - require:
      - cmd: pip

vmcloak_workingdir:
  file.directory:
    - name: {{ salt['pillar.get']('vmcloak:workingdir') }}
    - user: {{ salt['pillar.get']('cuckoo:user', 'cuckoo') }}
    - group: {{ salt['pillar.get']('cuckoo:user', 'cuckoo') }}
    - dir_mode: 755
    - file_mode: 644
    - recurse:
      - user
      - group
      - mode
    - makedirs: True
    - require:
      - user: cuckoo_user

office2007.iso:
  file.managed:
    - name: {{ salt['pillar.get']('vmcloak:workingdir') }}/office2007.iso
    - source: salt://cuckoo/files/office2007.iso
    - user: {{ salt['pillar.get']('cuckoo:user', 'cuckoo') }}
    - group: {{ salt['pillar.get']('cuckoo:user', 'cuckoo') }}
    - mode: 644
    - require:
      - file: vmcloak_workingdir

office2010.iso:
  file.managed:
    - name: {{ salt['pillar.get']('vmcloak:workingdir') }}/office2010.iso
    - source: salt://cuckoo/files/office2010.iso
    - user: {{ salt['pillar.get']('cuckoo:user', 'cuckoo') }}
    - group: {{ salt['pillar.get']('cuckoo:user', 'cuckoo') }}
    - mode: 644
    - require:
      - file: vmcloak_workingdir

archive_zip:
  file.managed:
    - name: {{ salt['pillar.get']('vmcloak:workingdir') }}/archive.zip
    - source: salt://cuckoo/files/archive.zip
    - user: {{ salt['pillar.get']('cuckoo:user', 'cuckoo') }}
    - group: {{ salt['pillar.get']('cuckoo:user', 'cuckoo') }}
    - mode: 644
    - require:
      - file: vmcloak_workingdir

wallpaper_jpg:
  file.managed:
    - name: {{ salt['pillar.get']('vmcloak:workingdir') }}/wallpaper.jpg
    - source: salt://cuckoo/files/wallpaper.jpg
    - user: {{ salt['pillar.get']('cuckoo:user', 'cuckoo') }}
    - group: {{ salt['pillar.get']('cuckoo:user', 'cuckoo') }}
    - mode: 644
    - require:
      - file: vmcloak_workingdir

{% if salt['pillar.get']('vms:winxp:create') %}
winxp_iso:
  file.managed:
    - name: {{ salt['pillar.get']('vmcloak:workingdir') }}/winxp.iso
    - source: salt://cuckoo/files/winxp.iso
    - user: {{ salt['pillar.get']('cuckoo:user', 'cuckoo') }}
    - group: {{ salt['pillar.get']('cuckoo:user', 'cuckoo') }}
    - mode: 644
    - require:
      - file: vmcloak_workingdir

winxp_mount:
  mount.mounted:
    - name: {{ salt['pillar.get']('vmcloak:isomountdir') }}/winxp
    - device: {{ salt['pillar.get']('vmcloak:workingdir') }}/winxp.iso
    - fstype: iso9660
    - mkmnt: True
    - persist: False
    - opts: loop,ro
    - require:
      - file: winxp_iso
{% endif %}

{% if salt['pillar.get']('vms:win7x64:create') %}
win7x64_iso:
  file.managed:
    - name: {{ salt['pillar.get']('vmcloak:workingdir') }}/win7x64.iso
    - source: salt://cuckoo/files/win7x64.iso
    - user: {{ salt['pillar.get']('cuckoo:user', 'cuckoo') }}
    - group: {{ salt['pillar.get']('cuckoo:user', 'cuckoo') }}
    - mode: 644
    - require:
      - file: vmcloak_workingdir

win7x64_mount:
  mount.mounted:
    - name: {{ salt['pillar.get']('vmcloak:isomountdir') }}/win7x64
    - device: {{ salt['pillar.get']('vmcloak:workingdir') }}/win7x64.iso
    - fstype: iso9660
    - mkmnt: True
    - persist: False
    - opts: loop,ro
    - require:
      - file: win7x64_iso
{% endif %}

vmcloak_cleanup:
  file.absent:
    - name: {{ salt['pillar.get']('cuckoo:dir', '/srv/cuckoo') }}/.vmcloak

vmcloak_iptables:
  cmd.run:
{'fraction_non_alphanumeric': 0.20079610791685096, 'fraction_numerical': 0.023588382721509656, 'mean_word_length': 2.9858989424206817, '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': '3347941', 'n_tokens_mistral': 2911, 'n_tokens_neox': 2731, 'n_words': 392}