Merge "Standarise block/when ordering"
This commit is contained in:
commit
163c0b2fe5
@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
# Use a block to add become to a set of tasks
|
# Use a block to add become to a set of tasks
|
||||||
- name: Add build ssh key
|
- name: Add build ssh key
|
||||||
|
become: true
|
||||||
block:
|
block:
|
||||||
# Add the authorization first, to take advantage of manage_dir
|
# Add the authorization first, to take advantage of manage_dir
|
||||||
- name: Authorize build key
|
- name: Authorize build key
|
||||||
@ -32,4 +33,3 @@
|
|||||||
mode: 0644
|
mode: 0644
|
||||||
owner: "{{ copy_sshkey_target_user }}"
|
owner: "{{ copy_sshkey_target_user }}"
|
||||||
force: no
|
force: no
|
||||||
become: true
|
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
register: _cabal_version
|
register: _cabal_version
|
||||||
|
|
||||||
- name: Install cabal
|
- name: Install cabal
|
||||||
|
when: _cabal_version.rc != 0
|
||||||
block:
|
block:
|
||||||
- name: Ensure copr dnf plugin
|
- name: Ensure copr dnf plugin
|
||||||
package:
|
package:
|
||||||
@ -25,7 +26,6 @@
|
|||||||
name: cabal-install
|
name: cabal-install
|
||||||
state: present
|
state: present
|
||||||
become: true
|
become: true
|
||||||
when: _cabal_version.rc != 0
|
|
||||||
|
|
||||||
- name: Check package
|
- name: Check package
|
||||||
stat:
|
stat:
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
register: _stack_version
|
register: _stack_version
|
||||||
|
|
||||||
- name: Install stack
|
- name: Install stack
|
||||||
|
when: _stack_version.rc != 0
|
||||||
block:
|
block:
|
||||||
# This package is somehow missing from the requirements of the
|
# This package is somehow missing from the requirements of the
|
||||||
# published packaged copr repo. See
|
# published packaged copr repo. See
|
||||||
@ -31,4 +32,3 @@
|
|||||||
|
|
||||||
- name: Setup stack LTS
|
- name: Setup stack LTS
|
||||||
command: "stack {% if lts_version %}--resolver {{ lts_version }}{% endif %} setup"
|
command: "stack {% if lts_version %}--resolver {{ lts_version }}{% endif %} setup"
|
||||||
when: _stack_version.rc != 0
|
|
||||||
|
@ -73,6 +73,7 @@
|
|||||||
extra_args: ""
|
extra_args: ""
|
||||||
|
|
||||||
- name: Configure dns options if set
|
- name: Configure dns options if set
|
||||||
|
when: minikube_dns_resolvers|length>0
|
||||||
block:
|
block:
|
||||||
- name: Write resolv.conf
|
- name: Write resolv.conf
|
||||||
template:
|
template:
|
||||||
@ -82,7 +83,6 @@
|
|||||||
- name: Set extra kube setttings
|
- name: Set extra kube setttings
|
||||||
set_fact:
|
set_fact:
|
||||||
extra_args: "--extra-config=kubelet.resolv-conf={{ ansible_user_dir }}/.minikube/k8s_resolv.conf"
|
extra_args: "--extra-config=kubelet.resolv-conf={{ ansible_user_dir }}/.minikube/k8s_resolv.conf"
|
||||||
when: minikube_dns_resolvers|length>0
|
|
||||||
|
|
||||||
# See https://github.com/kubernetes/minikube/issues/14410
|
# See https://github.com/kubernetes/minikube/issues/14410
|
||||||
- name: Setup cri-dockerd
|
- name: Setup cri-dockerd
|
||||||
|
@ -8,6 +8,8 @@
|
|||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
- name: Install pip
|
- name: Install pip
|
||||||
|
become: yes
|
||||||
|
when: ensure_pip_from_packages_with_python2
|
||||||
block:
|
block:
|
||||||
- name: Check for EPEL repository
|
- name: Check for EPEL repository
|
||||||
stat:
|
stat:
|
||||||
@ -32,5 +34,3 @@
|
|||||||
- python-wheel
|
- python-wheel
|
||||||
state: present
|
state: present
|
||||||
enablerepo: epel
|
enablerepo: epel
|
||||||
become: yes
|
|
||||||
when: ensure_pip_from_packages_with_python2
|
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
register: _shake_version
|
register: _shake_version
|
||||||
|
|
||||||
- name: Install shake
|
- name: Install shake
|
||||||
|
when: "_shake_version.rc != 0"
|
||||||
block:
|
block:
|
||||||
- name: Include OS-specific variables
|
- name: Include OS-specific variables
|
||||||
include_vars: "{{ zj_distro_os }}"
|
include_vars: "{{ zj_distro_os }}"
|
||||||
@ -29,4 +30,3 @@
|
|||||||
name: "{{ shake_packages }}"
|
name: "{{ shake_packages }}"
|
||||||
state: present
|
state: present
|
||||||
become: yes
|
become: yes
|
||||||
when: "_shake_version.rc != 0"
|
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
when: register_twine.rc == 0
|
when: register_twine.rc == 0
|
||||||
|
|
||||||
- name: Ensure twine is installed
|
- name: Ensure twine is installed
|
||||||
|
when: register_twine.rc != 0
|
||||||
block:
|
block:
|
||||||
- name: Ensure twine is installed
|
- name: Ensure twine is installed
|
||||||
command: "{{ twine_python }} -m pip install twine!=1.12.0 requests-toolbelt!=0.9.0 --user"
|
command: "{{ twine_python }} -m pip install twine!=1.12.0 requests-toolbelt!=0.9.0 --user"
|
||||||
@ -19,4 +20,3 @@
|
|||||||
- name: Set pypi_twine_executable
|
- name: Set pypi_twine_executable
|
||||||
set_fact:
|
set_fact:
|
||||||
pypi_twine_executable: ~/.local/bin/twine
|
pypi_twine_executable: ~/.local/bin/twine
|
||||||
when: register_twine.rc != 0
|
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
- skip_ansible_lint
|
- skip_ansible_lint
|
||||||
|
|
||||||
- name: Return artifacts
|
- name: Return artifacts
|
||||||
|
when: not zuul_use_fetch_output
|
||||||
block:
|
block:
|
||||||
- name: Ensure artifacts directory exists
|
- name: Ensure artifacts directory exists
|
||||||
file:
|
file:
|
||||||
@ -26,4 +27,3 @@
|
|||||||
verify_host: true
|
verify_host: true
|
||||||
owner: no
|
owner: no
|
||||||
group: no
|
group: no
|
||||||
when: not zuul_use_fetch_output
|
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
warn: false
|
warn: false
|
||||||
|
|
||||||
- name: Fetch HTML
|
- name: Fetch HTML
|
||||||
|
when: not zuul_use_fetch_output
|
||||||
block:
|
block:
|
||||||
- name: Fetch archive HTML
|
- name: Fetch archive HTML
|
||||||
synchronize:
|
synchronize:
|
||||||
@ -35,9 +36,9 @@
|
|||||||
remote_src: true
|
remote_src: true
|
||||||
extra_opts:
|
extra_opts:
|
||||||
- "--no-same-owner"
|
- "--no-same-owner"
|
||||||
when: not zuul_use_fetch_output
|
|
||||||
|
|
||||||
- name: Copy HTML
|
- name: Copy HTML
|
||||||
|
when: zuul_use_fetch_output
|
||||||
block:
|
block:
|
||||||
- name: Copy archive HTML
|
- name: Copy archive HTML
|
||||||
copy:
|
copy:
|
||||||
@ -59,7 +60,6 @@
|
|||||||
remote_src: true
|
remote_src: true
|
||||||
extra_opts:
|
extra_opts:
|
||||||
- "--no-same-owner"
|
- "--no-same-owner"
|
||||||
when: zuul_use_fetch_output
|
|
||||||
|
|
||||||
- name: Return artifact to Zuul
|
- name: Return artifact to Zuul
|
||||||
zuul_return:
|
zuul_return:
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
register: translation_files
|
register: translation_files
|
||||||
|
|
||||||
- name: Collection translation files
|
- name: Collection translation files
|
||||||
|
when: translation_files.stat.exists
|
||||||
block:
|
block:
|
||||||
- name: Collect translation source files
|
- name: Collect translation source files
|
||||||
synchronize:
|
synchronize:
|
||||||
@ -22,4 +23,3 @@
|
|||||||
mode: 0755
|
mode: 0755
|
||||||
remote_src: true
|
remote_src: true
|
||||||
when: zuul_use_fetch_output
|
when: zuul_use_fetch_output
|
||||||
when: translation_files.stat.exists
|
|
||||||
|
@ -80,6 +80,8 @@
|
|||||||
when: extensions_to_txt is defined and extensions_to_txt is not none
|
when: extensions_to_txt is defined and extensions_to_txt is not none
|
||||||
|
|
||||||
- name: Collect log files
|
- name: Collect log files
|
||||||
|
when:
|
||||||
|
- stage_compress_logs
|
||||||
block:
|
block:
|
||||||
- name: Discover log files for compression
|
- name: Discover log files for compression
|
||||||
find:
|
find:
|
||||||
@ -104,5 +106,3 @@
|
|||||||
loop_var: zj_log_file
|
loop_var: zj_log_file
|
||||||
tags:
|
tags:
|
||||||
- skip_ansible_lint
|
- skip_ansible_lint
|
||||||
when:
|
|
||||||
- stage_compress_logs
|
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
register: upload_results
|
register: upload_results
|
||||||
|
|
||||||
- name: Return log URL
|
- name: Return log URL
|
||||||
|
when: upload_results is defined
|
||||||
block:
|
block:
|
||||||
- name: Return log URL to Zuul
|
- name: Return log URL to Zuul
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
@ -42,4 +43,3 @@
|
|||||||
- name: Print upload failures
|
- name: Print upload failures
|
||||||
debug:
|
debug:
|
||||||
var: upload_results.upload_failures
|
var: upload_results.upload_failures
|
||||||
when: upload_results is defined
|
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
register: upload_results
|
register: upload_results
|
||||||
|
|
||||||
- name: Return logs
|
- name: Return logs
|
||||||
|
when: upload_results is defined
|
||||||
block:
|
block:
|
||||||
- name: Return log URL to Zuul
|
- name: Return log URL to Zuul
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
@ -42,4 +43,3 @@
|
|||||||
- name: Print upload failures
|
- name: Print upload failures
|
||||||
debug:
|
debug:
|
||||||
var: upload_results.upload_failures
|
var: upload_results.upload_failures
|
||||||
when: upload_results is defined
|
|
||||||
|
@ -26,6 +26,9 @@
|
|||||||
mode: 0644
|
mode: 0644
|
||||||
|
|
||||||
- name: Run zuul_debug_info and collect output
|
- name: Run zuul_debug_info and collect output
|
||||||
|
when:
|
||||||
|
- ansible_os_family != "Windows"
|
||||||
|
- ansible_python_version is version('2.7', '>=')
|
||||||
block:
|
block:
|
||||||
- name: Collect information about zuul worker
|
- name: Collect information about zuul worker
|
||||||
zuul_debug_info:
|
zuul_debug_info:
|
||||||
@ -42,7 +45,3 @@
|
|||||||
dest: "{{ zuul_info_dir }}/zuul-info.{{ validate_host_hostname_sanitized }}.txt"
|
dest: "{{ zuul_info_dir }}/zuul-info.{{ validate_host_hostname_sanitized }}.txt"
|
||||||
src: templates/zuul-info.j2
|
src: templates/zuul-info.j2
|
||||||
mode: 0644
|
mode: 0644
|
||||||
|
|
||||||
when:
|
|
||||||
- ansible_os_family != "Windows"
|
|
||||||
- ansible_python_version is version('2.7', '>=')
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user