86 lines
2.7 KiB
YAML
86 lines
2.7 KiB
YAML
# Copyright 2018 Red Hat, Inc.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
# License for the specific language governing permissions and limitations
|
|
# under the License.
|
|
---
|
|
- name: Bootstrap SSH keys for zuul-connections
|
|
hosts: zuul-connections:!disabled
|
|
|
|
tasks:
|
|
# NOTE(pabelanger): Because of ordering issues create the required home
|
|
# directory first.
|
|
- name: Create zuul user directories
|
|
include_role:
|
|
name: windmill.zuul
|
|
vars:
|
|
zuul_task_manager:
|
|
- pre
|
|
|
|
- name: Setup windmill.ssh role
|
|
include_role:
|
|
name: windmill.ssh
|
|
with_items: "{{ zuul_connections_ssh }}"
|
|
vars:
|
|
ssh_key_private_content: "{{ item.ssh_key_private_content }}"
|
|
ssh_key_private_dest: "{{ item.ssh_key_private_dest }}"
|
|
ssh_key_public_content: "{{ item.ssh_key_public_content | default(False) }}"
|
|
ssh_key_public_dest: "{{ item.ssh_key_public_dest }}"
|
|
ssh_known_hosts_content: "{{ item.ssh_known_hosts_content | default(False) }}"
|
|
ssh_user_name: "{{ item.ssh_user_name }}"
|
|
ssh_user_home: "{{ item.ssh_user_home }}"
|
|
|
|
- name: Bootstrap zuul-executor
|
|
hosts: zuul-executor:!disabled
|
|
|
|
tasks:
|
|
- name: Setup windmill.ssh role
|
|
include_role:
|
|
name: windmill.ssh
|
|
|
|
# TODO(pabelanger): I'm thinking we should likely create
|
|
# ansible-role-bubblewrap to allow user to better manage this dependency.
|
|
- name: Ensure bubblewrap is present
|
|
become: true
|
|
package:
|
|
name: bubblewrap
|
|
state: present
|
|
|
|
- name: Setup windmill.ansible role
|
|
include_role:
|
|
name: windmill.ansible
|
|
with_items: "{{ zuul_executor_ansible }}"
|
|
vars:
|
|
ansible_pip_name: "{{ item.ansible_pip_name }}"
|
|
ansible_pip_virtualenv_python: "{{ item.ansible_pip_virtualenv_python }}"
|
|
ansible_pip_virtualenv: "{{ item.ansible_pip_virtualenv }}"
|
|
ansible_pip_virtualenv_symlink: "{{ item.ansible_pip_virtualenv_symlink }}"
|
|
|
|
- name: Install zuul
|
|
hosts: zuul:!disabled
|
|
|
|
tasks:
|
|
- name: Setup windmill.zuul role
|
|
include_role:
|
|
name: windmill.zuul
|
|
|
|
- name: Setup windmill.logrotate role.
|
|
include_role:
|
|
name: windmill.logrotate
|
|
|
|
- name: Bootstrap zuul-web
|
|
hosts: zuul-web:!disabled
|
|
|
|
tasks:
|
|
- name: Setup windmill.nginx role
|
|
include_role:
|
|
name: windmill.nginx
|