Add 'jumpcloud.yaml'
parent
9e46fd5ce4
commit
119bfef1d1
|
@ -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"
|
Loading…
Reference in New Issue