diff --git a/README.md b/README.md index 37aeada..fa38d3f 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,14 @@ Url prefix of the jenkins instance, e.g. when running in tomcat. The base url of the jenkins instance. + jenkins_facts_script_timeout: 30 + +The timeout for gathering facts via jenkins_script. + + jenkins_facts_uri_timeout: 30 + +The timeout for uri commands. + ## Dependencies This role has no hard dependencies but interacts heavily with the diff --git a/defaults/main.yml b/defaults/main.yml index 730a963..ab5e734 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -15,3 +15,9 @@ jenkins_facts_jenkins_url_prefix: "" # The base url of the jenkins instance jenkins_facts_jenkins_base_url: "http://{{ jenkins_facts_jenkins_hostname }}:{{ jenkins_facts_jenkins_port }}{{ jenkins_facts_jenkins_url_prefix }}" + +# The timeout for gathering facts via jenkins_script +jenkins_facts_script_timeout: 30 + +# The timeout for uri commands +jenkins_facts_uri_timeout: 30 diff --git a/tasks/gather_jenkins_facts.yml b/tasks/gather_jenkins_facts.yml index b12accc..e49f580 100644 --- a/tasks/gather_jenkins_facts.yml +++ b/tasks/gather_jenkins_facts.yml @@ -4,6 +4,7 @@ user: "{{ jenkins_facts_admin_username }}" password: "{{ jenkins_facts_admin_password }}" url: "{{ jenkins_facts_jenkins_base_url }}" + timeout: "{{ jenkins_facts_script_timeout }}" register: _jenkins_facts_gather_script_result - name: "gather_jenkins_facts : convert gathered facts to json." @@ -27,7 +28,9 @@ force_basic_auth: true user: "{{ jenkins_facts_admin_username }}" password: "{{ jenkins_facts_admin_password }}" + timeout: "{{ jenkins_facts_uri_timeout }}" return_content: yes + register: _jenkins_facts_csrf_crumb_result - name: "gather_jenkins_facts : set jenkins csrf crumb." @@ -54,4 +57,4 @@ - "{{ jenkins_facts_plugins_failed }}" - jenkins_facts_csrf_crumb - "{{ jenkins_facts_csrf_crumb }}" - verbosity: 1 \ No newline at end of file + verbosity: 1