Skip to content

Instantly share code, notes, and snippets.

@javawolfpack
Created November 14, 2022 18:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save javawolfpack/0d9eb38cf4e04a4b8548ad0eed7217d6 to your computer and use it in GitHub Desktop.
Save javawolfpack/0d9eb38cf4e04a4b8548ad0eed7217d6 to your computer and use it in GitHub Desktop.
node "csci345.localdomain" {
file { '/home/bryan/example_file.txt':
ensure => "file",
owner => "bryan",
group => "bryan",
mode => "700",
content => "Congratulations!
Puppet has created this file.
",}
class { 'apt':
update => {
frequency => 'daily',
},
}
exec { "apt-upgrade":
command => "/usr/bin/apt upgrade -y"
}
package { 'fortune':
ensure => present,
name => fortune,
}
#file { '/home/bryan/example_file.txt':
# ensure => present,
# source => "/home/bryan/puppet/test.txt",
#}
file_line { 'test line':
path => '/home/bryan/example_file.txt',
line => '%sudonopw ALL=(ALL) ALL',
match => '^%sudonopw',
}
user { 'grader':
name => grader,
ensure => present,
home => '/home/grader',
managehome => true,
shell => '/bin/bash',
password => '$2b$12$EW2vW/znEbyjJLsUOtvyKO0AGhbpgh65u/F9.KlaSpSJcfNvpUV1S'
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment