-
Notifications
You must be signed in to change notification settings - Fork 7
/
main.yml
40 lines (31 loc) · 1.53 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
---
- name: Find JumpCloud agent config to define if JumpCloud is installed
stat:
path: "{{ jumpcloud_agent_config }}"
register: jumpcloud_agent_config_status
become: "{{ jumpcloud_use_sudo }}"
- name: Set whether Jumpcloud is already installed
set_fact:
jumpcloud_is_installed: "{{ (jumpcloud_agent_config_status.stat.isreg is defined and jumpcloud_agent_config_status.stat.isreg) }}"
- name: Remove registered systems with the same displayName from JumpCloud
import_tasks: remove_registered_systems.yml
when: not jumpcloud_is_installed or jumpcloud_force_install
- name: Install JumpCloud dependencies if required
import_tasks: install_deps.yml
when: not jumpcloud_is_installed or jumpcloud_force_install
- name: Install JumpCloud if required
import_tasks: install.yml
when: not jumpcloud_is_installed or jumpcloud_force_install
- name: Get JumpCloud SystemKey
import_tasks: get_system_key.yml
when: jumpcloud_is_installed or jumpcloud_force_install
- name: Check System registration
import_tasks: check_system_registration.yml
when: jumpcloud_system_key is defined
- name: Update system attributes if the system is registered in JumpCloud
import_tasks: update_system.yml
when: jc_system_is_registered
- name: Add system to groups if groups are defined and the system is registered in JumpCloud
import_tasks: update_groups.yml
when: jc_system_is_registered and jumpcloud_system_groups is defined
...