From 65a7b00660cc8121b63d7c99227028f2cfdb7e89 Mon Sep 17 00:00:00 2001 From: Andrey Shestakov Date: Thu, 29 Dec 2016 15:13:18 +0200 Subject: [PATCH] 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 --- playbooks/roles/bifrost-ironic-install/tasks/bootstrap.yml | 4 ++-- .../bifrost-ironic-install/tasks/inspector_bootstrap.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/playbooks/roles/bifrost-ironic-install/tasks/bootstrap.yml b/playbooks/roles/bifrost-ironic-install/tasks/bootstrap.yml index be26b84d1..d37f4bb4e 100644 --- a/playbooks/roles/bifrost-ironic-install/tasks/bootstrap.yml +++ b/playbooks/roles/bifrost-ironic-install/tasks/bootstrap.yml @@ -234,8 +234,8 @@ owner: "root" group: "root" 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 }}", service_name: 'ironic-conductor', 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 | default('') }}", service_name: 'ironic-conductor', username: 'ironic', args: '--config-file /etc/ironic/ironic.conf'} - name: "Create and populate /tftpboot" include: create_tftpboot.yml - name: "Setup Inventory Hosts Directory" diff --git a/playbooks/roles/bifrost-ironic-install/tasks/inspector_bootstrap.yml b/playbooks/roles/bifrost-ironic-install/tasks/inspector_bootstrap.yml index 0e9503d33..b857df06f 100644 --- a/playbooks/roles/bifrost-ironic-install/tasks/inspector_bootstrap.yml +++ b/playbooks/roles/bifrost-ironic-install/tasks/inspector_bootstrap.yml @@ -73,6 +73,6 @@ - name: "Inspector - Place service" template: src={{ init_template }} dest={{ init_dest_dir }}{{item.service_name}}{{ init_ext }} owner=root group=root 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" command: iptables -I INPUT -p tcp --dport 5050 -i {{network_interface}} -j ACCEPT