Simple bundle to edit /etc/hosts
This commit is contained in:
parent
5c7dad802e
commit
c57bf87e34
17
lib.cf
17
lib.cf
|
@ -336,7 +336,7 @@ files:
|
|||
perms => mog ("$(prms[m])","$(prms[o])","$(prms[g])");
|
||||
methods:
|
||||
wget::
|
||||
"any" usebundle => "install_wget", handle=>"wget_installed";
|
||||
"any" usebundle => "install_wget"; #, handle=>"wget_installed";
|
||||
|
||||
commands:
|
||||
run_wget::
|
||||
|
@ -393,3 +393,18 @@ commands:
|
|||
args => "-a";
|
||||
}
|
||||
|
||||
|
||||
|
||||
bundle agent etc_hosts(hosts)
|
||||
{
|
||||
vars:
|
||||
"idx" slist => getindices(@(hosts));
|
||||
"settings[$(idx)]" string => "$(hosts[$(idx)])";
|
||||
files:
|
||||
"/etc/hosts"
|
||||
create => "true",
|
||||
perms => m("644"),
|
||||
edit_line => set_config_values("$(this.bundle).settings"),
|
||||
classes => results("namespace","etc_hosts");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue