- hosts: all roles: - ensure-pip tasks: - name: crudini pip: name: crudini state: present become: yes - name: Install additional packages needed by job environment package: name: "{{ item }}" state: present become: yes loop: - "{{ extra_packages }}" when: extra_packages is defined # NOTE(artom) The run-tempest role runs as the tempest user, so we need to give # the tempest user SSH access to all hosts. Devstack's orchestrate-devstack # role should have put a pubkey into the stack user's authorized_keys, so if we # put the corresponding private key in the tempest user's .ssh, things should # magically work. - name: Setup tempest SSH key include_role: name: copy-build-sshkey vars: ansible_become: yes copy_sshkey_target_user: 'tempest' - name: Collect compute hostnames set_fact: computes: "{{ ansible_play_hosts_all|map('extract', hostvars, 'ansible_fqdn')|list }}" run_once: true - name: Render compute_nodes.yaml template template: src: ../templates/compute_nodes.yaml.j2 dest: /home/zuul/compute_nodes.yaml run_once: true delegate_to: controller - name: Output the rendered file at /home/zuul/compute_nodes.yaml shell: | cat /home/zuul/compute_nodes.yaml run_once: true delegate_to: controller