regops 0.2.1

GitOps agent for localhost configuration management
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh
set -e

# 1. Create a dedicated system user
if ! getent passwd regops > /dev/null; then
    useradd --system --shell /usr/bin/bash regops
fi

# 2. Configure non-interactive sudo permissions
# Note: Granting full passwordless root access poses significant security risks.
echo "regops ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/regops
chmod 0440 /etc/sudoers.d/regops

# 3. Reload systemd, enable, and start the service
systemctl daemon-reload
systemctl enable regops.service
systemctl start regops.service