Debug School

Ishitaa Gangadhara
Ishitaa Gangadhara

Posted on

Chef Assignent1

Write a recipe to create a file which should be owned by group called “root”, user “ec2-user” and permission executable.

`user 'ec3-user' do
gid 'root'
action :create
end

group 'root' do
gid 1234
group_name 'root'
members 'ec2-user'
action :create
end

file 'hello.txt' do
content "Hello welcome to Chef"
group "root"
owner "ec2-user"
action :create
end
`

Write a chef recipe to Create a directory

directory '/etc/check' do
owner 'root'
group 'ec2-user'
mode '0755'
action :create
end

Top comments (0)