Fix stdout not defined

When file with tasks includes with condition check false, results of commands
has no 'stdout' argument. This fix adds default empty value.

Change-Id: Icfda6854e5e71e4194d2416eabe2c2b03ab9aaa7
This commit is contained in:
Andrey Shestakov 2016-12-29 15:13:18 +02:00
parent 0128ca8638
commit 65a7b00660
2 changed files with 3 additions and 3 deletions

View File

@ -234,8 +234,8 @@
owner: "root" owner: "root"
group: "root" group: "root"
with_items: with_items:
- { service_path: "{{ ironic_install_prefix.stdout }}", service_name: 'ironic-api', username: 'ironic', args: '--config-file /etc/ironic/ironic.conf'} - { service_path: "{{ ironic_install_prefix.stdout | default('') }}", service_name: 'ironic-api', username: 'ironic', args: '--config-file /etc/ironic/ironic.conf'}
- { service_path: "{{ ironic_install_prefix.stdout }}", service_name: 'ironic-conductor', username: 'ironic', args: '--config-file /etc/ironic/ironic.conf'} - { service_path: "{{ ironic_install_prefix.stdout | default('') }}", service_name: 'ironic-conductor', username: 'ironic', args: '--config-file /etc/ironic/ironic.conf'}
- name: "Create and populate /tftpboot" - name: "Create and populate /tftpboot"
include: create_tftpboot.yml include: create_tftpboot.yml
- name: "Setup Inventory Hosts Directory" - name: "Setup Inventory Hosts Directory"

View File

@ -73,6 +73,6 @@
- name: "Inspector - Place service" - name: "Inspector - Place service"
template: src={{ init_template }} dest={{ init_dest_dir }}{{item.service_name}}{{ init_ext }} owner=root group=root template: src={{ init_template }} dest={{ init_dest_dir }}{{item.service_name}}{{ init_ext }} owner=root group=root
with_items: with_items:
- { service_path: "{{ ironic_install_prefix.stdout }}", service_name: 'ironic-inspector', username: 'ironic', args: '--config-file /etc/ironic-inspector/inspector.conf'} - { service_path: "{{ ironic_install_prefix.stdout | default('') }}", service_name: 'ironic-inspector', username: 'ironic', args: '--config-file /etc/ironic-inspector/inspector.conf'}
- name: "Inspector - Explicitly permit TCP/5050 for ironic-inspector callback" - name: "Inspector - Explicitly permit TCP/5050 for ironic-inspector callback"
command: iptables -I INPUT -p tcp --dport 5050 -i {{network_interface}} -j ACCEPT command: iptables -I INPUT -p tcp --dport 5050 -i {{network_interface}} -j ACCEPT