29 lines
826 B
YAML
29 lines
826 B
YAML
---
|
|
- hosts: all
|
|
tasks:
|
|
- set_fact:
|
|
nodes: |
|
|
{% for host in hostvars %}
|
|
{{ host }} ansible_host={{ hostvars[host]['ansible_host'] }} ansible_become=true ansible_user={{ hostvars[host]['ansible_user'] }}
|
|
{% endfor %}
|
|
|
|
- name: Build playbook
|
|
template:
|
|
src: "templates/playbook.j2"
|
|
dest: "{{ ansible_env.HOME }}/{{ zuul.project.src_dir }}/playbook.yml"
|
|
delegate_to: "primary"
|
|
|
|
- include: 'roles/{{coe}}/tasks/run.yml'
|
|
|
|
- shell:
|
|
cmd: |
|
|
set -e
|
|
set -x
|
|
|
|
ansible-playbook -vvvvvv playbook.yml
|
|
executable: /bin/bash
|
|
chdir: "{{ ansible_env.HOME }}/{{ zuul.project.src_dir }}"
|
|
delegate_to: "primary"
|
|
environment: '{{ zuul | zuul_legacy_vars }}'
|
|
register: "{{project_name}}-output"
|