maas ALL= NOPASSWD: /usr/bin/lshw
maas ALL= NOPASSWD: /sbin/blockdev

# MAAS network monitoring tools.
maas ALL= NOPASSWD: /usr/lib/maas/network-monitor
maas ALL= NOPASSWD: /usr/lib/maas/beacon-monitor

# Control of the HTTP server: MAAS needs to reconfigure it after editing
# its configuration file, and start it again if stopped manually.
maas ALL= NOPASSWD: /bin/systemctl reload maas-http
maas ALL= NOPASSWD: /bin/systemctl restart maas-http
maas ALL= NOPASSWD: /bin/systemctl start maas-http
maas ALL= NOPASSWD: /bin/systemctl status maas-http

# Control of the NTP server: MAAS needs to reconfigure it after editing
# its configuration file, and start it again if stopped manually.
maas ALL= NOPASSWD: /bin/systemctl restart chrony
maas ALL= NOPASSWD: /bin/systemctl start chrony
maas ALL= NOPASSWD: /bin/systemctl status chrony

# Control of the DNS server: MAAS needs to track status and start it
# again if stopped manually.
maas ALL= NOPASSWD: /bin/systemctl status bind9
maas ALL= NOPASSWD: /bin/systemctl start bind9

# Control of the Proxy server: MAAS needs to reconfigure it after editing
# its configuration file, start it and stop it.
maas ALL= NOPASSWD: /bin/systemctl reload maas-proxy
maas ALL= NOPASSWD: /bin/systemctl restart maas-proxy
maas ALL= NOPASSWD: /bin/systemctl start maas-proxy
maas ALL= NOPASSWD: /bin/systemctl stop maas-proxy
maas ALL= NOPASSWD: /bin/systemctl status maas-proxy

# Control of the syslog server: MAAS needs to restart it after editing
# its configuration file, and start it again if stopped manually.
maas ALL= NOPASSWD: /bin/systemctl restart maas-syslog
maas ALL= NOPASSWD: /bin/systemctl start maas-syslog
maas ALL= NOPASSWD: /bin/systemctl status maas-syslog

# Writing and deleting files as root.
maas ALL= NOPASSWD: /usr/lib/maas/maas-delete-file
maas ALL= NOPASSWD: /usr/lib/maas/maas-write-file

# Allow active subnet mapping
maas ALL= NOPASSWD: /usr/lib/maas/maas-common scan-network *
maas ALL= NOPASSWD: /usr/lib/maas/maas-common scan-network
