Add 'jumpcloud.yaml'

master
Ariel Antigua 2018-09-06 17:20:11 -04:00
parent 9e46fd5ce4
commit 119bfef1d1
1 changed files with 23 additions and 0 deletions

23
jumpcloud.yaml Normal file
View File

@ -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"