Skip to content

Commit

Permalink
Merge pull request #116 from nextlayer-ops/fix/pushing-files
Browse files Browse the repository at this point in the history
Allow to use this role with lxd connection plugin
  • Loading branch information
zeitounator authored Oct 2, 2018
2 parents 042ef88 + 8250564 commit 6583078
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
.idea/
*.iml
.venv
molecule/**/.molecule/
molecule/**/__pycache__/
molecule/**/.cache
molecule/**/.pytest_cache
README.md.orig.*
README.md.toc.*
*.pyc

groovy-scripts.tar.gz
24 changes: 14 additions & 10 deletions tasks/nexus_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -376,22 +376,26 @@
state: absent
when: nexus_force_groovy_scripts_registration | default(false)

- name: Create directory to hold current groovy scripts for reference
- name: Create directories to hold current groovy scripts for reference
file:
path: "{{ nexus_data_dir }}/groovy-raw-scripts/current"
path: "{{ item }}"
state: directory
owner: root
group: root
with_items:
- "{{ nexus_data_dir }}/groovy-raw-scripts/current"
- "{{ nexus_data_dir }}/groovy-raw-scripts/new"

- name: Archive scripts
local_action:
module: archive
path: "{{ role_path }}/files/groovy/*"
dest: "{{ role_path }}/groovy-scripts.tar.gz"
run_once: true

- name: Upload new scripts
synchronize:
archive: no
checksum: yes
recursive: yes
delete: yes
mode: push
use_ssh_args: yes
src: "files/groovy/"
unarchive:
src: "{{ role_path }}/groovy-scripts.tar.gz"
dest: "{{ nexus_data_dir }}/groovy-raw-scripts/new/"

- name: Sync new scripts to old and get differences
Expand Down

0 comments on commit 6583078

Please sign in to comment.