kayobe/ansible/host-command-run.yml
Will Szumski c583922c27 Add support for infrastructure VMs
This change allows you to define additional VMs to deploy
on the seed-hypervisor.

Co-authored-by: Piotr Parczewski <piotr@stackhpc.com>
Co-authored-by: Will Szumski <will@stackhpc.com>
Co-authored-by: Mark Goddard <mark@stackhpc.com>
Story: 2008741
Task: 42095
Change-Id: I8055fc5eb0a9edadcb35767303c659922f2d07ca
2021-10-04 12:40:54 +01:00

17 lines
429 B
YAML

---
- name: Run a command
gather_facts: False
hosts: seed-hypervisor:seed:overcloud:infra-vms
tasks:
- name: Run a command
shell: "{{ host_command_to_run }}"
register: command_output
- name: Print stdout
debug:
msg: "{{ command_output.stdout }}"
when: show_output | bool
- name: Print stderr
debug:
msg: "{{ command_output.stderr }}"
when: show_output | bool