From 119bfef1d1b918a456a20d31b3bbeacc873be0e6 Mon Sep 17 00:00:00 2001 From: Ariel Antigua Date: Thu, 6 Sep 2018 17:20:11 -0400 Subject: [PATCH] Add 'jumpcloud.yaml' --- jumpcloud.yaml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 jumpcloud.yaml diff --git a/jumpcloud.yaml b/jumpcloud.yaml new file mode 100644 index 0000000..37a322f --- /dev/null +++ b/jumpcloud.yaml @@ -0,0 +1,23 @@ +- hosts: all + sudo: yes + + tasks: + - name: Install curl package (Debian based) + action: apt pkg='curl' state=installed + when: "'$ansible_pkg_mgr' == 'apt'" + + - name: Install curl package (RedHat based) + action: yum name='curl' state=installed + when: "'$ansible_pkg_mgr' == 'yum'" + + - name: Check if JumpCloud is already installed + shell: "[ -d /opt/jc ] && echo 'Found' || echo ''" + register: jc_installed + + - name: Update time + shell: "ntpdate -u pool.ntp.org" + when: "not jc_installed.stdout" + + - name: Install JumpCloud + shell: "curl --header 'x-connect-key: 29f6127fec609bfa862f3d0b78db5fc9c0e620b4' https://kickstart.jumpcloud.com/Kickstart | sudo bash" + when: "not jc_installed.stdout" \ No newline at end of file