aboutsummaryrefslogtreecommitdiff
path: root/setup_clippy.yml
diff options
context:
space:
mode:
authorjaseg <code@jaseg.net>2019-04-03 23:53:04 +0900
committerjaseg <git@jaseg.net>2019-04-03 23:53:04 +0900
commitbd281ef2e8213c6e92d68aefff9bfd1a8d8351d6 (patch)
treed1e2c013de56cad3b50703e9a14b9d421b19de56 /setup_clippy.yml
parent9358a57baeeeaaf6132953f033f71469c0154604 (diff)
downloadinfra-bd281ef2e8213c6e92d68aefff9bfd1a8d8351d6.tar.gz
infra-bd281ef2e8213c6e92d68aefff9bfd1a8d8351d6.tar.bz2
infra-bd281ef2e8213c6e92d68aefff9bfd1a8d8351d6.zip
gerbolyze fixes, clippy experiments
Diffstat (limited to 'setup_clippy.yml')
-rw-r--r--setup_clippy.yml69
1 files changed, 69 insertions, 0 deletions
diff --git a/setup_clippy.yml b/setup_clippy.yml
new file mode 100644
index 0000000..e4416e0
--- /dev/null
+++ b/setup_clippy.yml
@@ -0,0 +1,69 @@
+---
+- name: Clone pixelterm git
+ git:
+ repo: https://github.com/jaseg/pixelterm
+ dest: "{{clippy_root}}/var/lib/pixelterm.git"
+
+- name: Clone clippy git
+ git:
+ repo: https://github.com/jaseg/clippy
+ dest: "{{clippy_root}}/var/lib/clippy.git"
+
+- name: Setup required packages for clippy
+ command: arch-chroot "{{clippy_root}}" pacman -Syu --noconfirm python3 python-pip python-numpy python-pillow
+
+- name: Setup pixelterm
+ command: arch-chroot "{{clippy_root}}" sh -c "cd /var/lib/pixelterm.git && python3 setup.py install"
+
+- name: Setup container clippy systemd service file
+ template:
+ src: clippy.service.j2
+ dest: "{{clippy_root}}/etc/systemd/system/clippy.service"
+ owner: root
+ group: root
+ mode: 0664
+
+- name: Enable systemd machines target
+ systemd:
+ name: machines.target
+ enabled: yes
+
+- name: Copy over clippy container auto boot service file
+ copy:
+ src: clippy-nspawn.service
+ dest: /etc/systemd/system/clippy-nspawn.service
+ owner: root
+ group: root
+ mode: 0664
+
+- name: Enable clippy container auto boot
+ systemd:
+ daemon-reload: yes
+ name: clippy-nspawn.service
+ enabled: yes
+
+- name: Restart clippy container
+ shell: |
+ systemctl stop clippy-nspawn
+ sleep 1
+ systemctl start clippy-nspawn
+ for x in $(seq 0 30); do
+ systemctl -M clippy is-system-running && exit
+ sleep 1
+ done
+
+- name: Enable clippy systemd service in container
+ command: systemctl enable -M clippy clippy.service
+
+- name: Restart clippy systemd service in container
+ command: systemctl restart -M clippy clippy.service
+
+#- name: Enable host networkd
+# systemd:
+# name: systemd-networkd
+# enabled: yes
+# state: started
+
+- name: Enable clippy container networkd
+ command: systemctl enable -M clippy systemd-networkd
+