diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-18 05:52:35 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-18 05:52:35 +0000 |
commit | 7fec0b69a082aaeec72fee0612766aa42f6b1b4d (patch) | |
tree | efb569b86ca4da888717f5433e757145fa322e08 /ansible_collections/cyberark/pas/roles/aimprovider/tasks | |
parent | Releasing progress-linux version 7.7.0+dfsg-3~progress7.99u1. (diff) | |
download | ansible-7fec0b69a082aaeec72fee0612766aa42f6b1b4d.tar.xz ansible-7fec0b69a082aaeec72fee0612766aa42f6b1b4d.zip |
Merging upstream version 9.4.0+dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ansible_collections/cyberark/pas/roles/aimprovider/tasks')
3 files changed, 21 insertions, 17 deletions
diff --git a/ansible_collections/cyberark/pas/roles/aimprovider/tasks/installAIMProvider.yml b/ansible_collections/cyberark/pas/roles/aimprovider/tasks/installAIMProvider.yml index ea2217202..f95d9958c 100644 --- a/ansible_collections/cyberark/pas/roles/aimprovider/tasks/installAIMProvider.yml +++ b/ansible_collections/cyberark/pas/roles/aimprovider/tasks/installAIMProvider.yml @@ -12,12 +12,13 @@ (use_shared_logon_authentication|default(false) and password_object is not defined) -- debug: msg="Installation params => zip_file_name = {{zip_file_name}} folder_name={{folder_name}}" +- name: debug message + debug: msg="Installation params => zip_file_name = {{ zip_file_name }} folder_name={{ folder_name }}" - block: - name: Copy provider zip to target and unzip - unarchive: src="{{zip_file_name}}" dest=/tmp + unarchive: src="{{ zip_file_name }}" dest=/tmp - name: Rename aimparms and copy to var/tmp command: cp "/tmp/{{folder_name}}/aimparms.sample" /var/tmp/aimparms @@ -25,8 +26,8 @@ - name: Replace parameters" in /var/tmp/aimparms replace: dest: /var/tmp/aimparms - regexp: "{{item.regexp}}" - replace: "{{item.replace}}" + regexp: "{{ item.regexp }}" + replace: "{{ item.replace }}" with_items: - {regexp: '^AcceptCyberArkEULA=.*$', replace: 'AcceptCyberArkEULA=Yes'} - {regexp: '^LicensedProducts=.*$', replace: 'LicensedProducts=AIM'} @@ -36,7 +37,7 @@ - name: Change Vault.ini to the right address replace: - dest: "/tmp/{{folder_name}}/Vault.ini" + dest: "/tmp/{{ folder_name }}/Vault.ini" regexp: '^ADDRESS=.*$' replace: 'ADDRESS={{vault_address}}' @@ -45,15 +46,16 @@ path: "/tmp/{{folder_name}}/CreateCredFile" mode: 0755 - - find: - paths: "/tmp/{{folder_name}}" + - name: find rpm + find: + paths: "/tmp/{{ folder_name }}" patterns: "CARKaim-*.rpm" register: aimrpm # debug: msg="{{aimrpm.files[0].path}}" - name: Install Provider - package: name='{{aimrpm.files[0].path}}' state=present + package: name='{{ aimrpm.files[0].path }}' state=present - name: Verify status of service after installing Provider command: service aimprv status @@ -125,15 +127,15 @@ when: (command_result.rc != 0) - name: Set vault.ini Into Place - command: cp "/tmp/{{folder_name}}/Vault.ini" /etc/opt/CARKaim/vault/vault.ini + command: cp "/tmp/{{ folder_name }}/Vault.ini" /etc/opt/CARKaim/vault/vault.ini - name: Start Provider Service service: name=aimprv state=started when: (command_result.rc != 0) - - name: Remove /tmp/{{folder_name}} + - name: Remove /tmp/{{ folder_name }} file: - path: '/tmp/{{folder_name}}' + path: '/tmp/{{ folder_name }}' state: absent - name: Remove /var/tmp/aimparms @@ -143,10 +145,11 @@ rescue: - - name: Remove /tmp/{{folder_name}} + - name: Remove /tmp/{{ folder_name }} file: - path: '/tmp/{{folder_name}}' + path: '/tmp/{{ folder_name }}' state: absent - - fail: + - name: Failure to install + fail: msg: "AIM Credential Provider Installation failed!" diff --git a/ansible_collections/cyberark/pas/roles/aimprovider/tasks/main.yml b/ansible_collections/cyberark/pas/roles/aimprovider/tasks/main.yml index 9e65e1c61..18aff1960 100644 --- a/ansible_collections/cyberark/pas/roles/aimprovider/tasks/main.yml +++ b/ansible_collections/cyberark/pas/roles/aimprovider/tasks/main.yml @@ -15,10 +15,11 @@ args: warn: false -- debug: msg="status of service RC={{service_already_running.rc}}" +- name: debug message + debug: msg="status of service RC={{ service_already_running.rc }}" - import_tasks: installAIMProvider.yml when: (state == "present" and service_already_running.rc != 0) - import_tasks: uninstallAIMProvider.yml - when: (state == "absent" and service_already_running.rc == 0)
\ No newline at end of file + when: (state == "absent" and service_already_running.rc == 0) diff --git a/ansible_collections/cyberark/pas/roles/aimprovider/tasks/uninstallAIMProvider.yml b/ansible_collections/cyberark/pas/roles/aimprovider/tasks/uninstallAIMProvider.yml index 75c15f7e2..4b5947d22 100644 --- a/ansible_collections/cyberark/pas/roles/aimprovider/tasks/uninstallAIMProvider.yml +++ b/ansible_collections/cyberark/pas/roles/aimprovider/tasks/uninstallAIMProvider.yml @@ -58,4 +58,4 @@ rescue: - fail: - msg: "AIM Credential Provider Uninstall failed!"
\ No newline at end of file + msg: "AIM Credential Provider Uninstall failed!" |