In attribute file:-This is what i did :-So, I put user and group info in data bag and trying to override the information in attribute file with the data_bag info.Hello,I am working on a recipe of DB2 installation where the User and group information changes with every DB2 version.
<<< ----
In data_bag :-
{"id":"db2","V9.1":{"uid":"9001","uname":"db91inst","gid":"9100","gname":"db9grp"},"V9.5":{"uid":"9005","uname":"db95inst","gid":"9100","gname":"db9grp"}}
default[:db2][:version] = "V9.5"
default[:db2][:uid] = "uid"
default[:db2][:user] = "db2user"
default[:db2][:gid] = "gid"
default[:db2][:group] = "db2grp"
default[:net][:user] = {node[:db2][:uid] => [ node[:db2][:user], "db2 user", node[:db2][:db2home]] }
default[:net][:group] = { node[:db2][:gid] => node[:db2][:group] }In recipe file :-
=========================================================
db2client = node[:db2]
version = db2client[:version]
node.set[:db2][:uid] = DB2InstallInfo.getInstallUserId(version)
default[:net][:user] = {node[:db2][:uid] => [ node[:db2][:user], "db2 user", node[:db2][:db2home]] }
Archive powered by MHonArc 2.6.16.