summaryrefslogtreecommitdiffstats
path: root/ansible_collections/cyberark/pas/roles/aimprovider/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'ansible_collections/cyberark/pas/roles/aimprovider/tasks')
-rw-r--r--ansible_collections/cyberark/pas/roles/aimprovider/tasks/installAIMProvider.yml31
-rw-r--r--ansible_collections/cyberark/pas/roles/aimprovider/tasks/main.yml5
-rw-r--r--ansible_collections/cyberark/pas/roles/aimprovider/tasks/uninstallAIMProvider.yml2
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!"