---

# Tasks used to manange Jenkins CLI

- name : Ensure jenkins running
  become  : True
  service :
    name  : "{{ jenkins_service_name }}"
    state : started

- name : Ensure Jenkins is available
  wait_for :
    port  : "{{ jenkins_config_http_port }}"
    delay : "{{ jenkins_cli_waiting_available }}"

- name : Add debug for Travis
  register : jenkins_travis_debug
  get_url :
    url :  "{{ jenkins_cli_download_address }}"
    dest : "/tmp/foo"

- name: Get file content
    shell: cat /tmp/foo
  register: jenkins_travis_cli_debug

- name : Display debug variable
  debug :
    var : jenkins_travis_debug

- name : Display tmp file content
  debug :
    var : jenkins_travis_cli_debug

- name : Install Jenkins CLI
  become : True
  become_user : "{{ jenkins_config_user }}"
  get_url :
    url   : "{{ jenkins_cli_download_address }}"
    dest  : "{{ jenkins_cli_destination }}"
    force : True


---

# Tasks used to manange Jenkins CLI

- name : Ensure jenkins running
  become  : True
  service :
    name  : "{{ jenkins_service_name }}"
    state : started

- name : Ensure Jenkins is available
  wait_for :
    port  : "{{ jenkins_config_http_port }}"
    delay : "{{ jenkins_cli_waiting_available }}"

- name : Add debug for Travis
  register : jenkins_travis_debug
  get_url :
    url :  "{{ jenkins_cli_download_address }}"
    dest : "/tmp/foo"

- name: Get file content
  shell: cat /tmp/foo
  register: jenkins_travis_cli_debug

- name : Display debug variable
  debug :
    var : jenkins_travis_debug

- name : Display tmp file content
  debug :
    var : jenkins_travis_cli_debug

- name : Install Jenkins CLI
  become : True
  become_user : "{{ jenkins_config_user }}"
  get_url :
    url   : "{{ jenkins_cli_download_address }}"
    dest  : "{{ jenkins_cli_destination }}"
    force : True


Add debug for Travis failure - 3
Add debug for Travis failure - 3
