10 DevOps Chef how to use Attribute in recipe on node

Опубликовано: 04 Ноябрь 2024
на канале: HOC Linux Group
305
5

The basic introduction about Chef attribute, how we can use that attribute, what are the types of attribute and their priority, how to check ohai database with all system information, who defines the attributes, so covered under this Video.


Lab Script:-


file '/basicinfo' do
content "This is to get Attributes
HOSTNAME: #{node['hostname']}
IPADDRESS: #{node['ipaddress']}
MEMORY: #{node['memory']['total']}"
owner 'root'
group 'root'
action :create
end