diff options
author | Pedro Alvarez <pedro.alvarez@codethink.co.uk> | 2015-04-07 13:51:53 +0000 |
---|---|---|
committer | Pedro Alvarez <pedro.alvarez@codethink.co.uk> | 2015-04-10 10:55:35 +0000 |
commit | 2161861edbdb82925cea61ab554d1f7c73017f0f (patch) | |
tree | 8263e736c83f94d04e5bd84dd7b3d2a53b7a2979 | |
parent | 1e6f24e6232190e7217ab0d250f36fbc463d1460 (diff) | |
download | definitions-2161861edbdb82925cea61ab554d1f7c73017f0f.tar.gz |
openstack-network: Add service to run network.yml setup scripts
openvswitch-setup now is oneshot because openstack-network needs to
wait for it. Some other changes were needed to meet this change.
3 files changed, 13 insertions, 1 deletions
diff --git a/openstack/usr/lib/systemd/system/openstack-network-setup.service b/openstack/usr/lib/systemd/system/openstack-network-setup.service new file mode 100644 index 00000000..90c9ecf7 --- /dev/null +++ b/openstack/usr/lib/systemd/system/openstack-network-setup.service @@ -0,0 +1,11 @@ +[Unit] +Description=Run Ansible scripts to configure internal network for OpenStack +After=openvswitch.service openvswitch-setup.service +Before=systemd-networkd.service + +[Service] +Type=oneshot +ExecStart=/usr/bin/ansible-playbook -v -M /usr/share/ansible/ansible-openstack-modules -i /usr/share/openstack/hosts /usr/share/openstack/network.yml + +[Install] +WantedBy=multi-user.target diff --git a/openstack/usr/lib/systemd/system/openvswitch-db-server.service b/openstack/usr/lib/systemd/system/openvswitch-db-server.service index 5c7e7646..7ea7942a 100644 --- a/openstack/usr/lib/systemd/system/openvswitch-db-server.service +++ b/openstack/usr/lib/systemd/system/openvswitch-db-server.service @@ -1,6 +1,6 @@ [Unit] Description=Open vSwitch Database Server Daemon -After=local-fs.target openvswitch-setup.service +After=local-fs.target [Service] Type=forking diff --git a/openstack/usr/lib/systemd/system/openvswitch-setup.service b/openstack/usr/lib/systemd/system/openvswitch-setup.service index 1dbda6d8..6fdd7db6 100644 --- a/openstack/usr/lib/systemd/system/openvswitch-setup.service +++ b/openstack/usr/lib/systemd/system/openvswitch-setup.service @@ -3,6 +3,7 @@ Description=Run openvswitch-setup Ansible scripts After=local-fs.target [Service] +Type=oneshot ExecStart=/usr/bin/ansible-playbook -v -i /usr/share/openstack/hosts /usr/share/openstack/openvswitch.yml [Install] |