variant: flatcar
version: 1.0.0
passwd:
  users:
    - name: core
      password_hash: "$y$j9T$m46VXzNc1zu0uyjDS.upy/$.MbgKF58KYtxv2V23bRUcgqjcDzh5Xi6DBHyJKesQ.4"
      ssh_authorized_keys:
        - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDp+o1VlQmrw/vndzDIYou7pw6VTSQpwHmz7w9YOKt/0yKoFmPVOLuVCmJLFjkfYx4chC0/H6ul2mqRcxiaMQ5PeyyhTNuHJkR1GUWUTdAuj0t+7tfpQ+LThLjHYNEsumdptpTlYr/fs2sTG+KqE6BSkOmKaHA4y2leDtJ8idUGZeWek8/bCvMpPjTrpn1qsluaD+hujeN3DEv+ZQKoOiPusNfL2Xw8M6pi44PbjDzACVM6Z/X/oPTge2cTSCKAY1UiID/u3AU/UJSY+iEJUTXrpCRxx/odiIxBHGQw2SN7drL1DT1poRCuIVQhgnrjP3oTomIbdwKhblDEU5wiPl0b root@J1800MH2

systemd:
  units:

    - name: update-engine.service
      mask: true

    - name: locksmithd.service
      mask: true

    - name: docker.service
      enabled: true

    - name: nfsportainer.service
      enabled: true
      contents: |
        [Unit]
        Description=Portainer container with NFS share storage for settings
        After=docker.service
        Requires=docker.service
        [Service]
        TimeoutStartSec=0
        ExecStartPre=-/usr/bin/docker rm --force nfsportainer
        ExecStart=/usr/bin/docker run --name nfsportainer -p 9443:9443 --pull always --mount 'type=volume,src=nfsportainer,volume-driver=local,dst=/data,volume-opt=type=nfs,volume-opt=device=:/var/nfsshare/nfsportainer,"volume-opt=o=addr=192.168.1.121,nolock"' -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer-ce:latest 
        ExecStop=/usr/bin/docker stop nfsportainer
        Restart=always
        RestartSec=5s
        [Install]
        WantedBy=multi-user.target

storage:
  links:
  - path: /etc/systemd/system/multi-user.target.wants/docker.service
    target: /usr/lib/systemd/system/docker.service
    hard: false
    overwrite: true