chore: order cloud-init config
This commit is contained in:
parent
2f54f2e4d0
commit
929efba70c
1 changed files with 22 additions and 22 deletions
|
@ -38,6 +38,28 @@ write_files:
|
||||||
permissions: "0755"
|
permissions: "0755"
|
||||||
encoding: b64
|
encoding: b64
|
||||||
content: ${init_script}
|
content: ${init_script}
|
||||||
|
- path: /etc/systemd/system/coder-agent.service
|
||||||
|
permissions: "0644"
|
||||||
|
content: |
|
||||||
|
[Unit]
|
||||||
|
Description=Coder Agent
|
||||||
|
After=network-online.target
|
||||||
|
Wants=network-online.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
User=${username}
|
||||||
|
ExecStart=/opt/coder/init
|
||||||
|
Environment=CODER_AGENT_TOKEN=${coder_agent_token}
|
||||||
|
Restart=always
|
||||||
|
RestartSec=10
|
||||||
|
TimeoutStopSec=90
|
||||||
|
KillMode=process
|
||||||
|
|
||||||
|
OOMScoreAdjust=-900
|
||||||
|
SyslogIdentifier=coder-agent
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
%{ if install_podman_setup ~}
|
%{ if install_podman_setup ~}
|
||||||
- path: /etc/profile.d/podman.sh
|
- path: /etc/profile.d/podman.sh
|
||||||
permissions: "0644"
|
permissions: "0644"
|
||||||
|
@ -66,28 +88,6 @@ write_files:
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
%{ endif ~}
|
%{ endif ~}
|
||||||
- path: /etc/systemd/system/coder-agent.service
|
|
||||||
permissions: "0644"
|
|
||||||
content: |
|
|
||||||
[Unit]
|
|
||||||
Description=Coder Agent
|
|
||||||
After=network-online.target
|
|
||||||
Wants=network-online.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
User=${username}
|
|
||||||
ExecStart=/opt/coder/init
|
|
||||||
Environment=CODER_AGENT_TOKEN=${coder_agent_token}
|
|
||||||
Restart=always
|
|
||||||
RestartSec=10
|
|
||||||
TimeoutStopSec=90
|
|
||||||
KillMode=process
|
|
||||||
|
|
||||||
OOMScoreAdjust=-900
|
|
||||||
SyslogIdentifier=coder-agent
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
%{ if remote_ide_setup == "code_server" ~}
|
%{ if remote_ide_setup == "code_server" ~}
|
||||||
- path: /home/${username}/.config/code-server/config.yaml
|
- path: /home/${username}/.config/code-server/config.yaml
|
||||||
permissions: "0644"
|
permissions: "0644"
|
||||||
|
|
Loading…
Reference in a new issue