From 2933d3985e485e3b93bcca199a8f5a78a698e446 Mon Sep 17 00:00:00 2001 From: Paul Lecuq Date: Mon, 4 Jul 2022 15:25:12 +0200 Subject: [PATCH] updated micromdm state --- states/micromdm/defaults.yaml | 2 +- states/micromdm/install.sls | 24 +++++++++++++++++------- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/states/micromdm/defaults.yaml b/states/micromdm/defaults.yaml index 395c924..6c4c0c4 100644 --- a/states/micromdm/defaults.yaml +++ b/states/micromdm/defaults.yaml @@ -7,7 +7,7 @@ micromdm: config_path: "/var/lib/micromdm/db" filerepo: "/var/lib/micromdm/repo" url: "https://mdm.acme.com" - tls: false + tls: "false" api_key: 1234 command_webhook_url: "https://mdm.acme.com" version: "1.9.0" diff --git a/states/micromdm/install.sls b/states/micromdm/install.sls index dc5ef97..d3ab14c 100644 --- a/states/micromdm/install.sls +++ b/states/micromdm/install.sls @@ -21,30 +21,40 @@ micromdm-user: micromdm-archive-extract: archive.extracted: - name: {{ micromdm.release_dir }}/micromdm-{{ micromdm.version }} - - source: {{ micromdm.mirror }}/micromdm_v{{ micromdm.version }}.zip + - source: {{ micromdm.mirror }}/v{{ micromdm.version }}/micromdm_v{{ micromdm.version }}.zip - skip_verify: true - enforce_toplevel: false - - if_missing: {{ micromdm.release_dir }}/micromdm-{{ micromdm.version }}/micromdm + - if_missing: {{ micromdm.release_dir }}/micromdm-{{ micromdm.version }}/build/{{ micromdm.os }}/micromdm - watch_in: - service: micromdm-service micromdm-bin-symlink: file.symlink: - name: {{ micromdm.install_dir }}/micromdm - - target: {{ micromdm.release_dir }}/micromdm-{{ micromdm.version }} + - target: {{ micromdm.release_dir }}/micromdm-{{ micromdm.version }}/build/{{ micromdm.os }} -micromdm-data-dir: +micromdm-configpath-dir: file.directory: - - name: {{ micromdm.data_dir }} + - name: {{ micromdm.config_path }} - user: {{ micromdm.user.uid }} - group: {{ micromdm.group.gid }} + - makedirs: true - watch_in: - - service: micromdm-service + - service: micromdm-service + +micromdm-filerepo-dir: + file.directory: + - name: {{ micromdm.filerepo }} + - user: {{ micromdm.user.uid }} + - group: {{ micromdm.group.gid }} + - makedirs: true + - watch_in: + - service: micromdm-service {%- for bin in ['mdmctl'] %} micromdm-{{ bin }}-symlink: file.symlink: - - name: /usr/local/sbin/{{ bin }} + - name: /usr/local/bin/{{ bin }} - target: {{ micromdm.install_dir }}/micromdm/{{ bin }} {%- endfor %}