summaryrefslogtreecommitdiff
path: root/units
diff options
context:
space:
mode:
Diffstat (limited to 'units')
-rw-r--r--units/drop-lorry-controller-cronjob.service13
-rw-r--r--units/git-daemon.service3
-rw-r--r--units/lighttpd-git.service3
-rw-r--r--units/lighttpd-morph-cache.service3
-rw-r--r--units/releases-repo-migration.service14
-rw-r--r--units/trove-setup.service16
6 files changed, 25 insertions, 27 deletions
diff --git a/units/drop-lorry-controller-cronjob.service b/units/drop-lorry-controller-cronjob.service
deleted file mode 100644
index 8cad21f..0000000
--- a/units/drop-lorry-controller-cronjob.service
+++ /dev/null
@@ -1,13 +0,0 @@
-[Unit]
-Description=Drop lorry-controller from lorry's crontab
-After=basic.target
-ConditionPathExists=!/etc/lorry-controller/lorry-controller-removed-from-crontab
-
-[Service]
-Type=oneshot
-Restart=no
-ExecStart=/usr/libexec/remove-lorry-controller-from-lorry-crontab
-ExecStartPost=/bin/touch /etc/lorry-controller/lorry-controller-removed-from-crontab
-User=lorry
-Group=lorry
-PermissionsStartOnly=true
diff --git a/units/git-daemon.service b/units/git-daemon.service
index f6869c3..330169c 100644
--- a/units/git-daemon.service
+++ b/units/git-daemon.service
@@ -1,3 +1,6 @@
+[Install]
+WantedBy=multi-user.target
+
[Unit]
Description=Git Daemon for Trove
After=network.target
diff --git a/units/lighttpd-git.service b/units/lighttpd-git.service
index b2f6315..94c67a4 100644
--- a/units/lighttpd-git.service
+++ b/units/lighttpd-git.service
@@ -1,3 +1,6 @@
+[Install]
+WantedBy=multi-user.target
+
[Unit]
Description=Lighttpd Web Server
After=network.target
diff --git a/units/lighttpd-morph-cache.service b/units/lighttpd-morph-cache.service
index cedd071..c7f76e9 100644
--- a/units/lighttpd-morph-cache.service
+++ b/units/lighttpd-morph-cache.service
@@ -1,3 +1,6 @@
+[Install]
+WantedBy=multi-user.target
+
[Unit]
Description=Lighttpd Web Server
After=network.target
diff --git a/units/releases-repo-migration.service b/units/releases-repo-migration.service
deleted file mode 100644
index 1e161fb..0000000
--- a/units/releases-repo-migration.service
+++ /dev/null
@@ -1,14 +0,0 @@
-[Unit]
-Description=Create the ##PREFIX##/site/releases repository
-ConditionPathExists=!/home/git/repos/##PREFIX##/site/releases.git
-Requires=network.target
-After=network.target
-Requires=opensshd.service
-After=opensshd.service
-Requires=trove-early-setup.service
-After=trove-early-setup.service
-
-[Service]
-User=git
-ExecStart=/usr/share/trove-setup/releases-repo-migration.sh
-Restart=no
diff --git a/units/trove-setup.service b/units/trove-setup.service
new file mode 100644
index 0000000..3b923a2
--- /dev/null
+++ b/units/trove-setup.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=Run trove-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/trove/trove.conf
+
+[Service]
+ExecStart=/usr/bin/ansible-playbook -v -i /usr/lib/trove-setup/ansible/hosts /usr/lib/trove-setup/ansible/trove-setup.yml