Add zuul_task_manager to expose control of tasks
There might be a time were we only want run the pre task, so rather then copying the code into another modules, just allow the user to override the task list that runs. Change-Id: I97a40294ac3332bcce20ca4e3458c9988816c6c7 Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
parent
3e2496e28e
commit
7af82ea854
@ -12,6 +12,13 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
---
|
---
|
||||||
|
# tasks/main.yaml
|
||||||
|
zuul_task_manager:
|
||||||
|
- pre
|
||||||
|
- install
|
||||||
|
- config
|
||||||
|
- service
|
||||||
|
|
||||||
# tasks/config.yaml
|
# tasks/config.yaml
|
||||||
zuul_user_name: zuul
|
zuul_user_name: zuul
|
||||||
zuul_user_group: zuul
|
zuul_user_group: zuul
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
# NOTE(pabelanger): This needs to be here for now, since we need python-pip.
|
# NOTE(pabelanger): This needs to be here for now, since we need python-pip.
|
||||||
- name: Ensure EPEL is enabled.
|
- name: Ensure EPEL is enabled.
|
||||||
|
become: yes
|
||||||
package:
|
package:
|
||||||
name: epel-release
|
name: epel-release
|
||||||
state: installed
|
state: installed
|
||||||
@ -26,6 +27,7 @@
|
|||||||
ansible_os_family == 'RedHat'
|
ansible_os_family == 'RedHat'
|
||||||
|
|
||||||
- name: Ensure build dependencies are installed.
|
- name: Ensure build dependencies are installed.
|
||||||
|
become: yes
|
||||||
package:
|
package:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
state: installed
|
state: installed
|
||||||
@ -37,6 +39,7 @@
|
|||||||
# TODO(pabelanger): Remove once https://review.openstack.org/#/c/316387/ has
|
# TODO(pabelanger): Remove once https://review.openstack.org/#/c/316387/ has
|
||||||
# been merged.
|
# been merged.
|
||||||
- name: Install missing pip dependencies
|
- name: Install missing pip dependencies
|
||||||
|
become: yes
|
||||||
pip:
|
pip:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
with_items:
|
with_items:
|
||||||
|
@ -13,11 +13,13 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
---
|
---
|
||||||
- name: Git clone zuul.
|
- name: Git clone zuul.
|
||||||
|
become: yes
|
||||||
git:
|
git:
|
||||||
dest: "{{ zuul_git_dest }}"
|
dest: "{{ zuul_git_dest }}"
|
||||||
repo: "{{ zuul_git_uri }}"
|
repo: "{{ zuul_git_uri }}"
|
||||||
version: "{{ zuul_git_version }}"
|
version: "{{ zuul_git_version }}"
|
||||||
|
|
||||||
- name: Pip install zuul from local git repo.
|
- name: Pip install zuul from local git repo.
|
||||||
|
become: yes
|
||||||
pip:
|
pip:
|
||||||
name: "file://{{ zuul_git_dest }}"
|
name: "file://{{ zuul_git_dest }}"
|
||||||
|
@ -13,11 +13,13 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
---
|
---
|
||||||
- name: Install zuul using pip.
|
- name: Install zuul using pip.
|
||||||
|
become: yes
|
||||||
pip:
|
pip:
|
||||||
name: zuul
|
name: zuul
|
||||||
when: zuul_pip_version is none
|
when: zuul_pip_version is none
|
||||||
|
|
||||||
- name: Install zuul using pip.
|
- name: Install zuul using pip.
|
||||||
|
become: yes
|
||||||
pip:
|
pip:
|
||||||
name: zuul
|
name: zuul
|
||||||
version: "{{ zuul_pip_version }}"
|
version: "{{ zuul_pip_version }}"
|
||||||
|
@ -15,13 +15,7 @@
|
|||||||
- name: Include OS-specific variables.
|
- name: Include OS-specific variables.
|
||||||
include_vars: "{{ ansible_os_family }}.yaml"
|
include_vars: "{{ ansible_os_family }}.yaml"
|
||||||
|
|
||||||
- include: pre.yaml
|
- include: "{{ zuul_task }}.yaml"
|
||||||
become: yes
|
with_items: "{{ zuul_task_manager }}"
|
||||||
|
loop_control:
|
||||||
- include: install.yaml
|
loop_var: zuul_task
|
||||||
become: yes
|
|
||||||
|
|
||||||
- include: config.yaml
|
|
||||||
|
|
||||||
- include: service.yaml
|
|
||||||
become: yes
|
|
||||||
|
@ -73,6 +73,7 @@
|
|||||||
when: zuul_file_zuul_server_service_src is not defined
|
when: zuul_file_zuul_server_service_src is not defined
|
||||||
|
|
||||||
- name: Copy zuul service config into place.
|
- name: Copy zuul service config into place.
|
||||||
|
become: yes
|
||||||
copy:
|
copy:
|
||||||
dest: "{{ zuul_file_zuul_service_config_dest }}"
|
dest: "{{ zuul_file_zuul_service_config_dest }}"
|
||||||
group: "{{ zuul_file_zuul_service_config_group }}"
|
group: "{{ zuul_file_zuul_service_config_group }}"
|
||||||
@ -81,6 +82,7 @@
|
|||||||
src: "{{ zuul_file_zuul_service_config_src }}"
|
src: "{{ zuul_file_zuul_service_config_src }}"
|
||||||
|
|
||||||
- name: Copy zuul-launcher service into place.
|
- name: Copy zuul-launcher service into place.
|
||||||
|
become: yes
|
||||||
copy:
|
copy:
|
||||||
dest: "{{ zuul_file_zuul_launcher_service_dest }}"
|
dest: "{{ zuul_file_zuul_launcher_service_dest }}"
|
||||||
group: "{{ zuul_file_zuul_launcher_service_group }}"
|
group: "{{ zuul_file_zuul_launcher_service_group }}"
|
||||||
@ -89,6 +91,7 @@
|
|||||||
src: "{{ zuul_file_zuul_launcher_service_src }}"
|
src: "{{ zuul_file_zuul_launcher_service_src }}"
|
||||||
|
|
||||||
- name: Copy zuul-merger service into place.
|
- name: Copy zuul-merger service into place.
|
||||||
|
become: yes
|
||||||
copy:
|
copy:
|
||||||
dest: "{{ zuul_file_zuul_merger_service_dest }}"
|
dest: "{{ zuul_file_zuul_merger_service_dest }}"
|
||||||
group: "{{ zuul_file_zuul_merger_service_group }}"
|
group: "{{ zuul_file_zuul_merger_service_group }}"
|
||||||
@ -97,6 +100,7 @@
|
|||||||
src: "{{ zuul_file_zuul_merger_service_src }}"
|
src: "{{ zuul_file_zuul_merger_service_src }}"
|
||||||
|
|
||||||
- name: Copy zuul-server service into place.
|
- name: Copy zuul-server service into place.
|
||||||
|
become: yes
|
||||||
copy:
|
copy:
|
||||||
dest: "{{ zuul_file_zuul_server_service_dest }}"
|
dest: "{{ zuul_file_zuul_server_service_dest }}"
|
||||||
group: "{{ zuul_file_zuul_server_service_group }}"
|
group: "{{ zuul_file_zuul_server_service_group }}"
|
||||||
@ -105,6 +109,7 @@
|
|||||||
src: "{{ zuul_file_zuul_server_service_src }}"
|
src: "{{ zuul_file_zuul_server_service_src }}"
|
||||||
|
|
||||||
- name: Enable zuul-launcher service.
|
- name: Enable zuul-launcher service.
|
||||||
|
become: yes
|
||||||
service:
|
service:
|
||||||
enabled: "{{ zuul_service_zuul_launcher_enabled }}"
|
enabled: "{{ zuul_service_zuul_launcher_enabled }}"
|
||||||
name: "{{ zuul_service_zuul_launcher_name }}"
|
name: "{{ zuul_service_zuul_launcher_name }}"
|
||||||
@ -113,6 +118,7 @@
|
|||||||
when: zuul_service_zuul_launcher_manage
|
when: zuul_service_zuul_launcher_manage
|
||||||
|
|
||||||
- name: Enable zuul-merger service.
|
- name: Enable zuul-merger service.
|
||||||
|
become: yes
|
||||||
service:
|
service:
|
||||||
enabled: "{{ zuul_service_zuul_merger_enabled }}"
|
enabled: "{{ zuul_service_zuul_merger_enabled }}"
|
||||||
name: "{{ zuul_service_zuul_merger_name }}"
|
name: "{{ zuul_service_zuul_merger_name }}"
|
||||||
@ -121,6 +127,7 @@
|
|||||||
when: zuul_service_zuul_merger_manage
|
when: zuul_service_zuul_merger_manage
|
||||||
|
|
||||||
- name: Enable zuul-server service.
|
- name: Enable zuul-server service.
|
||||||
|
become: yes
|
||||||
service:
|
service:
|
||||||
enabled: "{{ zuul_service_zuul_server_enabled }}"
|
enabled: "{{ zuul_service_zuul_server_enabled }}"
|
||||||
name: "{{ zuul_service_zuul_server_name }}"
|
name: "{{ zuul_service_zuul_server_name }}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user