Skip to content

Commit

Permalink
contrib: setup_templates: use a mount unit for the job config file
Browse files Browse the repository at this point in the history
This feels a bit cleaner than calling mount in a service unit.
  • Loading branch information
hnez committed Aug 27, 2024
1 parent 73e4ec2 commit 2fc597f
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion contrib/setup_templates/generic/cloud-init/user-data
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,22 @@ write_files:
ExecStart=
ExecStart=-/sbin/agetty --autologin root --noclear %I $TERM

- path: /etc/systemd/system/home-runner-config.mount
content: |
[Unit]
Description=Forrest Job config filesystem mount

[Mount]
What=/dev/disk/by-label/JOBDATA
Where=/home/runner/config
Options=rw,fmask=0022,dmask=0022,uid=runner,gid=runner

- path: /etc/systemd/system/github-action-runner.service
content: |
[Unit]
Description=GitHub JIT Runner
After=network.target cloud-final.service
After=network.target cloud-final.service home-runner-config.mount
Requires=home-runner-config.mount

[Service]
ExecStart=/home/runner/config/job.sh
Expand Down

0 comments on commit 2fc597f

Please sign in to comment.