Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
EvgeniyPatlan authored Feb 8, 2025
1 parent 0cec416 commit 7b42f98
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions build/packer/pmm.json
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,21 @@
"type": "shell",
"only": ["virtualbox-ovf"],
"inline": [
"sudo userdel -r vagrant",
"sudo rm -f /etc/sudoers.d/vagrant"
"cat << 'EOF' | sudo tee /etc/systemd/system/remove-vagrant.service",
"[Unit]",
"Description=Remove vagrant user after boot",
"After=network.target",
"",
"[Service]",
"Type=oneshot",
"ExecStart=/usr/sbin/userdel -r vagrant",
"ExecStart=/bin/rm -f /etc/sudoers.d/vagrant",
"RemainAfterExit=yes",
"",
"[Install]",
"WantedBy=multi-user.target",
"EOF",
"sudo systemctl enable remove-vagrant.service"
]
}
],
Expand Down

0 comments on commit 7b42f98

Please sign in to comment.