Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
renoirb committed Jun 8, 2015
1 parent 42de996 commit beb7f06
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tasks/dreamobjects_upload/backup.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{%- set endpoint = salt['pillar.get']('accounts:swift:dreamhost:endpoint') -%}
{%- set key = salt['pillar.get']('dreamobjects:backup:key', 'missing_key') -%}
{%- set secret = salt['pillar.get']('dreamobjects:backup:secret', 'missing_secret') -%}
{%- set bucket = salt['pillar.get']('dreamobjects:backup:bucket', 'missing_bucket') -%}
{%- set dir = salt['pillar.get']('dreamobjects:backup:dir', 'missing_dir') -%}

/usr/local/sbin/dreamobjects_uploader.sh:
cmd.wait:
- onlyif: test -d {{ dir }}
- cwd: {{ dir }}
- stateful: True
- env:
- 'ST_KEY': '{{ secret }}'
- 'ST_USER': '{{ key }}'
- 'ST_AUTH': '{{ endpoint }}'
- 'SYNC_DIR': '{{ dir }}'
- 'SYNC_BUCKET': '{{ bucket }}'

0 comments on commit beb7f06

Please sign in to comment.