From fba0a496209923ad36ea7203bcf573a314a054e8 Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Tue, 7 Apr 2015 13:51:53 +0000 Subject: Add service to run network.yml setup scripts --- .../usr/lib/systemd/system/openstack-network-setup.service | 10 ++++++++++ openstack/usr/lib/systemd/system/openvswitch-setup.service | 1 + 2 files changed, 11 insertions(+) create mode 100644 openstack/usr/lib/systemd/system/openstack-network-setup.service 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..f2e35226 --- /dev/null +++ b/openstack/usr/lib/systemd/system/openstack-network-setup.service @@ -0,0 +1,10 @@ +[Unit] +Description=Run Ansible scripts to configure internal network for OpenStack +After=openvswitch.service openvswitch-setup.service +Before=systemd-networkd.service + +[Service] +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-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] -- cgit v1.2.1