Skip to content

Instantly share code, notes, and snippets.

@haam3r
Created September 20, 2017 12:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save haam3r/6d90ef81c617db2bd38a92268bc15246 to your computer and use it in GitHub Desktop.
Save haam3r/6d90ef81c617db2bd38a92268bc15246 to your computer and use it in GitHub Desktop.
How to rename unpacked dokuwiki tgz in salt
dokuwiki_tar:
archive.extracted:
- name: /srv/
- source: https://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz
- source_hash: dc00ccb55a4ce2c0dc36d76066a28f4f7541f4b3
{% set dir_path = salt['archive.list']('https://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz')|first %}
dokuwiki_folder_rename:
file.rename:
- name: {{ documentroot }}
- source: /srv/{{ dir_path }}
- makedirs: True
- require:
- archive: dokuwiki_tar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment