Cookbook Files and Templates Tutorial | CHEF NTP Tutorial | DevOps with AWS Tutorial

Published: 07 July 2021
on channel: Online Tutorial
1,351
9

Cookbook Files and Templates Tutorial | Cookbook NTP Tutorial | DevOps with AWS Tutorial
#Cookbook #CookbookTutorial #CookbookNTP #DevOpsTutorial


coobook
statements
if
when
looping
if/etc/ssh/sshd_config do this if the file does not exists create it

onlyif will ge execute only if the file is present
notif
configuration file for a process
100 lines of playbook

1st line config file is changes
process has tob e restarted immedialy at the end of the client excution

notify restart immediatly delayed

NOT IF
Copy file somefile123 from workstation to client
/root/chef-repo/cookbooks/notif/templates/somefile123
dest=/tmp/somefile123
if file /etc/passwd does not exists , then only do this

knife node run_list add nodename cookbook
knife node edit nodename i editor

notify

if a configuration file for application xyz is changed

restart xyz
excute some command this case
immediatly
execute at the end of the chef-client execute delayed


cookbook_file vs template,chef file resource,chef templates,chef cookbook_file create directory,chef generate template example,chef template if statement,chef create multiple files,chef notifies,chef template conditional,chef templates,chef resources,chef cookbook_file,chef generate template,chef template if statement,chef recipe example,chef template create parent directory,chef file resource,chef template conditional,recipe book template, pdf,powerpoint cookbook template,cookbook template canva,cookbook template google docs,writing a cookbook template,e cookbook template,modern cookbook template,cookbook template indesign
hosts webserer
tasks
name : copy a file from serer to sae
template : src-index.html dest -/ar/www/html/index.html

template '/ar/www/html/index.html' do
source 'index.html'
end

ssh configuration file

application xyz
changed the configuration file

1 immediatly copy the file execute the command create group
2 delayed copy the file create group execute the command

1 1000 lines
100 configuration file xyz immediatly 110
2 1000 lines
100 configuration file xyz
110
202
900
1000 restart
execute a shell scripts as part of cookbook execution
10 lines

bash

multi packages

[package1,package2,package3], each do

action : install
end

when
os_family : read

when
os_family :redhat
package name =httpd
action : install
os_family : ubuntu
package name - apache2
action : install

component in chef, that gathers system ariables for all the clients

facts in ansible

aws opsworks

ntp network time protocol

100 machines in the lab
all machines should be in time sync

ntp serer synced to all clients
ntp clients
ntp serer
ntp client
configuration


Watch video Cookbook Files and Templates Tutorial | CHEF NTP Tutorial | DevOps with AWS Tutorial online without registration, duration hours minute second in high quality. This video was added by user Online Tutorial 07 July 2021, don't forget to share it with your friends and acquaintances, it has been viewed on our site 1,351 once and liked it 9 people.