From 9739f4cfe5ad98ad4811d98e9ae6452f0e55a0be Mon Sep 17 00:00:00 2001 From: Manuel Buil Date: Fri, 19 Oct 2018 18:34:47 +0200 Subject: Use changed_when instead of the when condition The 'when' condition does not make sense and it was added in order to avoid the ansible-lint error which requires all command or shell modules to use a condition. This can be avoided with changed_when as explained: http://willthames.github.io/2016/09/21/using-command-and-shell-in-ansible.html Change-Id: I36316ea0848cff9763745af6dd8d8defcd993b70 Signed-off-by: Manuel Buil --- scenarios/os-odl-sfc/role/os-odl-sfc/tasks/post-deployment.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scenarios/os-odl-sfc') diff --git a/scenarios/os-odl-sfc/role/os-odl-sfc/tasks/post-deployment.yml b/scenarios/os-odl-sfc/role/os-odl-sfc/tasks/post-deployment.yml index cc6c47ff..837a8ee3 100644 --- a/scenarios/os-odl-sfc/role/os-odl-sfc/tasks/post-deployment.yml +++ b/scenarios/os-odl-sfc/role/os-odl-sfc/tasks/post-deployment.yml @@ -10,8 +10,8 @@ - name: "Fetch the ip of the neutron server container" shell: 'grep controller00_neutron_server_container -n1 /etc/openstack_deploy/openstack_inventory.json | grep ansible_host | cut -d":" -f2 | cut -d "\"" -f2' register: ip - when: "'odl' in deploy_scenario" + change_when: False - name: Fetch the ml2_conf.ini to process ODL variables command: "scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no {{ ip.stdout }}:/etc/neutron/plugins/ml2/ml2_conf.ini /tmp/ml2_conf.ini" - when: "'odl' in deploy_scenario" + change_when: False -- cgit 1.2.3-korg