Skip to content

Commit

Permalink
ocsinventory: tag option added to client
Browse files Browse the repository at this point in the history
  • Loading branch information
daks committed Mar 28, 2012
1 parent 26939ae commit 70edfd1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ocsinventory/README
Expand Up @@ -20,3 +20,5 @@ ocsinventory::agent
ocs_server (mandatory):
the ocsinventory server to send inventories

ocs_tag (optional):
a tag for ocsinventory client
5 changes: 5 additions & 0 deletions ocsinventory/manifests/init.pp
Expand Up @@ -9,6 +9,11 @@
ensure => installed,
}


$tag = $ocs_tag ? {
undef => '',
default => "$ocs_tag",
}
file { "/etc/ocsinventory/ocsinventory-agent.cfg":
ensure => present,
content => template("ocsinventory/ocsinventory-agent.cfg.erb"),
Expand Down
1 change: 1 addition & 0 deletions ocsinventory/templates/ocsinventory-agent.cfg.erb
Expand Up @@ -6,3 +6,4 @@
# module ocsinventory

server=<%= ocs_server %>
<% if tag != '' %>tag=<%= tag %><% end %>
1 change: 1 addition & 0 deletions snmp/manifests/server.pp
Expand Up @@ -17,6 +17,7 @@
"puppet:///files/${domain}/etc/snmp/snmpd.conf",
"puppet:///files/global/etc/snmp/snmpd.conf",
],
notify => Service["${snmp::params::srv_name}"],
}

service { "${snmp::params::srv_name}":
Expand Down

0 comments on commit 70edfd1

Please sign in to comment.