summaryrefslogtreecommitdiff
path: root/distbuild/usr/lib/systemd/system/distbuild-setup.service
diff options
context:
space:
mode:
authorPedro Alvarez <pedro.alvarez@codethink.co.uk>2014-08-28 16:21:56 +0000
committerPedro Alvarez <pedro.alvarez@codethink.co.uk>2014-09-17 11:39:19 +0100
commitfdae161d301c1d3e89e4bdafdf34a7e09ff0d663 (patch)
tree9933c281786ab4beec8fa2c85eb140fe0b05035c /distbuild/usr/lib/systemd/system/distbuild-setup.service
parent0f50bd8af1e69a52ef6b93a0380fb9d67828c553 (diff)
downloaddefinitions-fdae161d301c1d3e89e4bdafdf34a7e09ff0d663.tar.gz
Configure distbuild with Ansible
Diffstat (limited to 'distbuild/usr/lib/systemd/system/distbuild-setup.service')
-rw-r--r--distbuild/usr/lib/systemd/system/distbuild-setup.service16
1 files changed, 16 insertions, 0 deletions
diff --git a/distbuild/usr/lib/systemd/system/distbuild-setup.service b/distbuild/usr/lib/systemd/system/distbuild-setup.service
new file mode 100644
index 00000000..ec5f5a2d
--- /dev/null
+++ b/distbuild/usr/lib/systemd/system/distbuild-setup.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=Run distbuild-setup Ansible scripts
+Requires=network.target
+After=network.target
+Requires=opensshd.service
+After=opensshd.service
+
+# If there's a shared /var subvolume, it must be mounted before this
+# unit runs.
+Requires=local-fs.target
+After=local-fs.target
+
+ConditionPathExists=/etc/distbuild/distbuild.conf
+
+[Service]
+ExecStart=/usr/bin/ansible-playbook -v -i /usr/lib/distbuild-setup/ansible/hosts /usr/lib/distbuild-setup/ansible/distbuild-setup.yml