Delinea Client Installation Playbook
The playbook performs the following tasks:
-
Create the configuration file for the Delinea repository if it is not already present
-
Install the CentrifyCC package using Yum
Playbook example installing Delinea Client:
---
- hosts: all
become: true
vars:
delinea_repo: /etc/yum.repos.d/centrify-rpm-redhat.repo
tasks:
- name: Check if delinea.repo exists
stat:
path: "{{delinea_repo}}"
register: filecheck
- name: Create delinea.repo if it doesn't exist
copy:
src: "{{delinea_repo}}"
dest: "{{delinea_repo}}"
owner: root
group: root
mode: '0644'
when: filecheck.stat.exists == false
- name: Install Delinea Server Suit Agent package
yum:
update_cache: yes
name: CentrifyCC
state: latest
Delinea Client Uninstallation Playbook
The playbook performs the following tasks:
-
Check if the CentrifyCC package is installed (skip further actions if not installed)
-
Check if a computer is enrolled with a Delinea tenant (skip further actions if not joined)
-
Uninstall the CentrifyCC packages using Yum
Playbook example uninstalling Delinea Client:
---
- hosts: all
become: true
vars:
delinea_repo: /etc/yum.repos.d/centrify-rpm-redhat.repo
tasks:
- name: Check if CentrifyCC is installed
yum:
list: CentrifyCC
register: yum_cmd
- name: Check if computer is joined to Delinea Cloud Suite
command: cinfo
register: cinfo_cmd
changed_when: cinfo_cmd.rc == 10
failed_when:
- cinfo_cmd.rc != 10
- cinfo_cmd.rc != 0
- name: Remove Delinea Server Suite package
block:
- name: Remove CentrifyCC package
yum:
name: CentrifyCC
state: absent
- name: Delete delinea.repo
file:
path: "{{delinea_repo}}"
state: absent
when:
- yum_cmd.results | selectattr("yumstate", "match", "installed") | list | length == 1
- cinfo_cmd.rc == 10