diff --git a/Ansible/ansible_collections/jfrog/installers/galaxy.yml b/Ansible/ansible_collections/jfrog/installers/galaxy.yml index 64bf9c9..605050a 100644 --- a/Ansible/ansible_collections/jfrog/installers/galaxy.yml +++ b/Ansible/ansible_collections/jfrog/installers/galaxy.yml @@ -9,7 +9,7 @@ namespace: "jfrog" name: "installers" # The version of the collection. Must be compatible with semantic versioning -version: "1.1.0" +version: "1.1.1" # The path to the Markdown (.md) readme file. This path is relative to the root of the collection readme: "README.md" diff --git a/Ansible/ansible_collections/jfrog/installers/jfrog-installers-1.1.0.tar.gz b/Ansible/ansible_collections/jfrog/installers/jfrog-installers-1.1.0.tar.gz deleted file mode 100644 index 5e8aebb..0000000 Binary files a/Ansible/ansible_collections/jfrog/installers/jfrog-installers-1.1.0.tar.gz and /dev/null differ diff --git a/Ansible/ansible_collections/jfrog/installers/jfrog-installers-1.1.1.tar.gz b/Ansible/ansible_collections/jfrog/installers/jfrog-installers-1.1.1.tar.gz new file mode 100644 index 0000000..448b6f5 Binary files /dev/null and b/Ansible/ansible_collections/jfrog/installers/jfrog-installers-1.1.1.tar.gz differ diff --git a/Ansible/ansible_collections/jfrog/installers/roles/artifactory/defaults/main.yml b/Ansible/ansible_collections/jfrog/installers/roles/artifactory/defaults/main.yml index 5cdaab6..eaeddfa 100644 --- a/Ansible/ansible_collections/jfrog/installers/roles/artifactory/defaults/main.yml +++ b/Ansible/ansible_collections/jfrog/installers/roles/artifactory/defaults/main.yml @@ -49,4 +49,8 @@ service_list: group_name: "{{ artifactory_group }}" # if this is an upgrade -artifactory_upgrade_only: false \ No newline at end of file +artifactory_upgrade_only: false + +#default username and password +artifactory_app_username: admin +artifactory_app_user_pass: password \ No newline at end of file diff --git a/Ansible/ansible_collections/jfrog/installers/roles/artifactory/tasks/install.yml b/Ansible/ansible_collections/jfrog/installers/roles/artifactory/tasks/install.yml index ccf9150..9537459 100644 --- a/Ansible/ansible_collections/jfrog/installers/roles/artifactory/tasks/install.yml +++ b/Ansible/ansible_collections/jfrog/installers/roles/artifactory/tasks/install.yml @@ -202,7 +202,7 @@ - name: Ensure permissions are correct file: - path: "{{ artifactory_home }}" + path: "{{ jfrog_home_directory }}" group: "{{ artifactory_group }}" owner: "{{ artifactory_user }}" recurse: yes diff --git a/Ansible/ansible_collections/jfrog/installers/roles/artifactory/tasks/main.yml b/Ansible/ansible_collections/jfrog/installers/roles/artifactory/tasks/main.yml index fe837eb..02a3819 100644 --- a/Ansible/ansible_collections/jfrog/installers/roles/artifactory/tasks/main.yml +++ b/Ansible/ansible_collections/jfrog/installers/roles/artifactory/tasks/main.yml @@ -12,7 +12,7 @@ register: artifactory_installed_version - name: Debug defunct installation debug: - var: artifactory_installed_version + var: artifactory_installed_version.json.version - name: Setup temporary untar home set_fact: temp_untar_home: "{{ jfrog_home_directory }}/artifactory-{{ artifactory_flavour }}-{{ artifactory_installed_version }}" diff --git a/Ansible/ansible_collections/jfrog/installers/roles/artifactory/tasks/upgrade.yml b/Ansible/ansible_collections/jfrog/installers/roles/artifactory/tasks/upgrade.yml index a0273dd..5ac0fd8 100644 --- a/Ansible/ansible_collections/jfrog/installers/roles/artifactory/tasks/upgrade.yml +++ b/Ansible/ansible_collections/jfrog/installers/roles/artifactory/tasks/upgrade.yml @@ -14,6 +14,19 @@ state: directory become: yes +- name: Local Copy artifactory + unarchive: + src: "{{ local_artifactory_tar }}" + dest: "{{ jfrog_home_directory }}" + owner: "{{ artifactory_user }}" + group: "{{ artifactory_group }}" + creates: "{{ artifactory_untar_home }}" + become: yes + when: local_artifactory_tar is defined + register: downloadartifactory + until: downloadartifactory is succeeded + retries: 3 + - name: download artifactory unarchive: src: "{{ artifactory_tar }}" @@ -23,24 +36,42 @@ group: "{{ artifactory_group }}" creates: "{{ artifactory_untar_home }}" become: yes + when: artifactory_tar is defined register: downloadartifactory until: downloadartifactory is succeeded retries: 3 -- name: Delete artifactory app +#- name: Delete artifactory app +# file: +# path: "{{ artifactory_home }}/app" +# state: absent +# become: yes + +#- name: CP new app to artifactory app +# command: "cp -r {{ artifactory_untar_home }}/app {{ artifactory_home }}/app" +# become: yes + +#- name: Delete untar directory +# file: +# path: "{{ artifactory_untar_home }}" +# state: absent +# become: yes + +- name: Create Symlinks for app folder file: - path: "{{ artifactory_home }}/app" - state: absent + state: link + src: "{{ artifactory_untar_home }}/app" + dest: "{{ artifactory_home }}/app" + owner: "{{ artifactory_user }}" + group: "{{ artifactory_group }}" become: yes -- name: CP new app to artifactory app - command: "cp -r {{ artifactory_untar_home }}/app {{ artifactory_home }}/app" - become: yes - -- name: Delete untar directory +- name: Ensure permissions are correct file: - path: "{{ artifactory_untar_home }}" - state: absent + path: "{{ jfrog_home_directory }}" + group: "{{ artifactory_group }}" + owner: "{{ artifactory_user }}" + recurse: yes become: yes - name: start and enable the primary node