Skip to content

Commit

Permalink
Merge pull request #10 from inviqa/fix/timeout-issue
Browse files Browse the repository at this point in the history
Fix/timeout issue
  • Loading branch information
marcomc authored Mar 7, 2019
2 parents eebd93e + fcd4077 commit d8eddb2
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 32 deletions.
4 changes: 3 additions & 1 deletion handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
---

- name: restart JumpCloud
- name: restart JumpCloud
service:
name: "{{ jumpcloud_agent_service }}"
state: restarted
become: "{{ jumpcloud_use_sudo }}"

...
1 change: 0 additions & 1 deletion tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
creates: "{{ jumpcloud_agent_config}}"
become: "{{ jumpcloud_use_sudo }}"


- name: Check JumpCloud agent config again
stat:
path: "{{ jumpcloud_agent_config }}"
Expand Down
61 changes: 31 additions & 30 deletions tasks/reset_jumpcloud.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,49 @@
---
- name: stop JumpCloud
- name: stop JumpCloud
service:
name: "{{ jumpcloud_agent_service }}"
state: stopped
become: "{{ jumpcloud_use_sudo }}"
name: "{{ jumpcloud_agent_service }}"
state: stopped
become: "{{ jumpcloud_use_sudo }}"

- name: remove JumpCloud CA certificate
- name: remove JumpCloud CA certificate
file:
path: "{{jumpcloud_ca_cert}}"
state: absent
become: "{{ jumpcloud_use_sudo }}"
path: "{{jumpcloud_ca_cert}}"
state: absent
become: "{{ jumpcloud_use_sudo }}"

- name: remove JumpCloud Client certificate
- name: remove JumpCloud Client certificate
file:
path: "{{jumpcloud_client_cert}}"
state: absent
become: "{{ jumpcloud_use_sudo }}"
path: "{{jumpcloud_client_cert}}"
state: absent
become: "{{ jumpcloud_use_sudo }}"

- name: remove JumpCloud Client Key
- name: remove JumpCloud Client Key
file:
path: "{{jumpcloud_client_key}}"
state: absent
become: "{{ jumpcloud_use_sudo }}"
path: "{{jumpcloud_client_key}}"
state: absent
become: "{{ jumpcloud_use_sudo }}"

- name: Start JumpCloud
- name: Start JumpCloud
service:
name: "{{ jumpcloud_agent_service }}"
state: started
become: "{{ jumpcloud_use_sudo }}"
name: "{{ jumpcloud_agent_service }}"
state: started
become: "{{ jumpcloud_use_sudo }}"

- name: Make Sure that jcagent.conf has been created
- name: Make Sure that jcagent.conf has been created
wait_for:
path: "{{ jumpcloud_agent_config}}"
state: present
timeout: 60
msg: Timeout to find file "{{ jumpcloud_agent_config}}"
path: "{{ jumpcloud_agent_config }}"
state: present
timeout: 60
msg: Timeout to find file "{{ jumpcloud_agent_config}}"
become: "{{ jumpcloud_use_sudo }}"

- name: check JumpCloud agent config again
- name: check JumpCloud agent config again
stat:
path: "{{ jumpcloud_agent_config }}"
register: jumpcloud_agent_config_status
become: "{{ jumpcloud_use_sudo }}"
path: "{{ jumpcloud_agent_config }}"
register: jumpcloud_agent_config_status
become: "{{ jumpcloud_use_sudo }}"

- name: check again if JumpCloud is installed
- name: check again if JumpCloud is installed
set_fact:
jumpcloud_is_installed: "{{ jumpcloud_agent_config_status.stat.isreg is defined and jumpcloud_agent_config_status.stat.isreg}}"
...

0 comments on commit d8eddb2

Please sign in to comment.