diff options
author | liyuenan <liyuenan@huawei.com> | 2016-12-27 17:44:34 +0800 |
---|---|---|
committer | liyuenan <liyuenan@huawei.com> | 2017-01-05 09:42:35 +0800 |
commit | 92f6ca7bb6d7b2f295406aab34094b1dba76ff94 (patch) | |
tree | c4e62927a3bf9862f7ba9ce286cbece2c4335ef4 /deploy/adapters/ansible/roles/neutron-network | |
parent | 6072a49adb33f2bce3f48b9c7b8be7d96cf8501c (diff) |
Yamllint test
JIRA: COMPASS-516
Change-Id: I482ce9bc86f4f963258c5b8823e0b00e83556eef
Signed-off-by: liyuenan <liyuenan@huawei.com>
Diffstat (limited to 'deploy/adapters/ansible/roles/neutron-network')
6 files changed, 26 insertions, 14 deletions
diff --git a/deploy/adapters/ansible/roles/neutron-network/handlers/main.yml b/deploy/adapters/ansible/roles/neutron-network/handlers/main.yml index a279b5d5..cd98581a 100644 --- a/deploy/adapters/ansible/roles/neutron-network/handlers/main.yml +++ b/deploy/adapters/ansible/roles/neutron-network/handlers/main.yml @@ -24,8 +24,8 @@ - name: kill dnsmasq command: killall dnsmasq - ignore_errors: True + ignore_errors: "True" - name: restart xorp service: name=xorp state=restarted enabled=yes sleep=10 - ignore_errors: True + ignore_errors: "True" diff --git a/deploy/adapters/ansible/roles/neutron-network/tasks/firewall.yml b/deploy/adapters/ansible/roles/neutron-network/tasks/firewall.yml index 49b6a7f1..9aa24045 100755 --- a/deploy/adapters/ansible/roles/neutron-network/tasks/firewall.yml +++ b/deploy/adapters/ansible/roles/neutron-network/tasks/firewall.yml @@ -27,4 +27,5 @@ when: ansible_os_family == "Debian" - name: update firewall related conf - shell: crudini --set --list /etc/neutron/neutron.conf DEFAULT service_plugins firewall + shell: | + crudini --set --list /etc/neutron/neutron.conf DEFAULT service_plugins firewall diff --git a/deploy/adapters/ansible/roles/neutron-network/tasks/main.yml b/deploy/adapters/ansible/roles/neutron-network/tasks/main.yml index 753d281a..1e204405 100644 --- a/deploy/adapters/ansible/roles/neutron-network/tasks/main.yml +++ b/deploy/adapters/ansible/roles/neutron-network/tasks/main.yml @@ -54,14 +54,17 @@ - name: fix openstack neutron plugin config file shell: | - sed -i 's,plugins/ml2/openvswitch_agent.ini,plugin.ini,g' /usr/lib/systemd/system/neutron-openvswitch-agent.service + sed -i 's,plugins/ml2/openvswitch_agent.ini,plugin.ini,g' \ + /usr/lib/systemd/system/neutron-openvswitch-agent.service; systemctl daemon-reload when: ansible_os_family == 'RedHat' - name: fix openstack neutron plugin config file ubuntu shell: | - sed -i 's,plugins/ml2/openvswitch_agent.ini,plugin.ini,g' /etc/init/neutron-openvswitch-agent.conf - sed -i 's,plugins/ml2/openvswitch_agent.ini,plugin.ini,g' /etc/init.d/neutron-openvswitch-agent + sed -i 's,plugins/ml2/openvswitch_agent.ini,plugin.ini,g' \ + /etc/init/neutron-openvswitch-agent.con; + sed -i 's,plugins/ml2/openvswitch_agent.ini,plugin.ini,g' \ + /etc/init.d/neutron-openvswitch-agent; when: ansible_os_family == "Debian" - name: config l3 agent @@ -86,7 +89,10 @@ backup=yes - name: ln plugin.ini - file: src=/etc/neutron/plugins/ml2/ml2_conf.ini dest=/etc/neutron/plugin.ini state=link + file: + src: /etc/neutron/plugins/ml2/ml2_conf.ini + dest: /etc/neutron/plugin.ini + state: link - name: config neutron template: src=templates/neutron.conf diff --git a/deploy/adapters/ansible/roles/neutron-network/tasks/odl.yml b/deploy/adapters/ansible/roles/neutron-network/tasks/odl.yml index dd1e4786..1105b45d 100644 --- a/deploy/adapters/ansible/roles/neutron-network/tasks/odl.yml +++ b/deploy/adapters/ansible/roles/neutron-network/tasks/odl.yml @@ -15,7 +15,11 @@ register: ovs_uuid - name: set bridge_mappings - command: ovs-vsctl set Open_vSwitch {{ ovs_uuid.stdout }} other_config:bridge_mappings=physnet1:{{ INTERFACE_NAME }} + command: | + ovs-vsctl set Open_vSwitch {{ ovs_uuid.stdout }} \ + other_config:bridge_mappings=physnet1:{{ INTERFACE_NAME }} - name: set local ip - command: ovs-vsctl set Open_vSwitch {{ ovs_uuid.stdout }} other_config:local_ip={{ internal_ip }} + command: | + ovs-vsctl set Open_vSwitch {{ ovs_uuid.stdout }} \ + other_config:local_ip={{ internal_ip }} diff --git a/deploy/adapters/ansible/roles/neutron-network/tasks/vpn.yml b/deploy/adapters/ansible/roles/neutron-network/tasks/vpn.yml index 925eb709..22f4411a 100755 --- a/deploy/adapters/ansible/roles/neutron-network/tasks/vpn.yml +++ b/deploy/adapters/ansible/roles/neutron-network/tasks/vpn.yml @@ -27,9 +27,12 @@ when: ansible_os_family == "Debian" - name: update vpn related conf - shell: crudini --set /etc/neutron/l3_agent.ini vpnagent vpn_device_driver neutron_vpnaas.services.vpn.device_drivers.strongswan_ipsec.StrongSwanDriver; - crudini --set --list /etc/neutron/neutron.conf DEFAULT service_plugins vpnaas - crudini --set /etc/neutron/neutron_vpnaas.conf service_providers service_provider 'VPN:strongswan:neutron_vpnaas.services.vpn.service_drivers.ipsec.IPsecVPNDriver:default' + shell: | + crudini --set /etc/neutron/l3_agent.ini vpnagent vpn_device_driver \ + neutron_vpnaas.services.vpn.device_drivers.strongswan_ipsec.StrongSwanDriver; + crudini --set --list /etc/neutron/neutron.conf DEFAULT service_plugins vpnaas; + crudini --set /etc/neutron/neutron_vpnaas.conf service_providers service_provider \ + 'VPN:strongswan:neutron_vpnaas.services.vpn.service_drivers.ipsec.IPsecVPNDriver:default' - name: make sure rootwrap.d dir exist file: path=/etc/neutron/rootwrap.d state=directory mode=0755 @@ -44,4 +47,3 @@ - strongswan notify: - restart vpn agent service - diff --git a/deploy/adapters/ansible/roles/neutron-network/vars/RedHat.yml b/deploy/adapters/ansible/roles/neutron-network/vars/RedHat.yml index aa35dde6..1d0243a4 100644 --- a/deploy/adapters/ansible/roles/neutron-network/vars/RedHat.yml +++ b/deploy/adapters/ansible/roles/neutron-network/vars/RedHat.yml @@ -26,4 +26,3 @@ openvswitch_agent: neutron-openvswitch-agent xorp_packages: - openssl098e - #- xorp |