Created
April 8, 2024 11:02
-
-
Save csmr/e5fa3ca2997ffd6aa2dcabde2a780774 to your computer and use it in GitHub Desktop.
Debian puppet manifest example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class debian_desktop { | |
# Install desktop environment | |
package { 'xfce4': | |
ensure => installed, | |
} | |
# Install common applications | |
package { ['firefox', 'thunderbird', 'libreoffice', 'gimp']: | |
ensure => installed, | |
} | |
# Set timezone | |
file { '/etc/timezone': | |
ensure => file, | |
content => 'America/Los_Angeles', | |
} | |
# Configure locale | |
exec { 'dpkg-reconfigure locales': | |
command => 'dpkg-reconfigure locales', | |
unless => 'grep -q en_US.UTF-8 /etc/default/locale', | |
} | |
# Create user account | |
user { 'user': | |
ensure => present, | |
password => '$6$rounds=4096$...', | |
groups => ['sudo'], | |
managehome => true, | |
} | |
# Copy SSH authorized keys | |
file { '/home/user/.ssh/authorized_keys': | |
ensure => file, | |
owner => 'user', | |
group => 'user', | |
mode => '0600', | |
content => 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCwINnRY0c3lq6CD1Lx75KqrJMEz8C/f9onzrqc8f8c+nWp/g+gjU4JILCkqOZblzM3h6rOJm+e8J1k8cYbf0tLTvLEaxfSnxQe9h2r9g+Y3/GPOHJhdl5NMGtW8uFA5fBqihR7qJdyEmTvphzDq0YVgBbyU9k+we6oKFQDY6rbDfrX73Tp1LlYROyKC4UD6h+L+WpCp+s9cFJE6EnD1wK2Mqj+DxXzBKkE3Y5e7QN0QAzWKg93bKNA1ujK5yHE3VaUwEgw2oKfTQXVZRrF6l1g6iIy3RODgzyPPbJ3/WLX/D3l8S4iUu0cAwEAAQ== user@laptop', | |
} | |
# Disable root login | |
file { '/etc/ssh/sshd_config': | |
ensure => file, | |
owner => 'root', | |
group => 'root', | |
mode => '0600', | |
content => inline_template('...'), | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment