Advertisement
Guest User

artifactory.sls

a guest
Nov 11th, 2013
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.27 KB | None | 0 0
  1. {% set art = piller.get('artifactory', {}) %}
  2. {% set version = art.get('version', '3.0.4') %}
  3. {% set base = art.get('base', '/opt') %}
  4. {% set home = art.get('home', '/opt/artifactory') %}
  5. {% set uid = art.get('uid', '1030') %}
  6. {% set gid = art.get('gid', '1006') %}
  7.  
  8. artifactory:
  9.   group.present:
  10.     - name: system
  11.     - gid: {{ gid }}
  12.   user.present:
  13.     - uid: {{ uid }}
  14.     - gid: {{ gid }}
  15.     - home: {{ home }}
  16.     - shell: /bin/bash
  17.     - require:
  18.       - group: artifactory
  19.   file.managed:
  20.     - name: /var/lib/artifactory-{{ version }}.zip
  21.     - source: 'http://dl.bintray.com/content/jfrog/artifactory/artifactory-{{ version }}.zip?direct'
  22.     - source_hash: md5=c65a2a41657d9e14b35a81c66ace78c6
  23.     - require:
  24.       - user: artifactory
  25.   cmd.wait:
  26.     - cwd: {{ base }}
  27.     - name: 'unzip /var/lib/artifactory-{{ version }}.zip && ln -sf {{ base }}/artifactory-{{ version }} {{ home }} && chown artifactory:artifactory {{ base }}/artifactory -R'
  28.     - watch:
  29.       - file: artifactory
  30.   service.running:
  31.     - enabled: True
  32.     - require:
  33.       - cmd: 'artifactory service install'
  34.       - user: artifactory
  35.  
  36. artifactory service install:
  37.   cmd.wait:
  38.     - cwd: {{ home }}
  39.     - name: bin/installService.sh
  40.     - watch:
  41.       - cmd: artifactory
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement