Hi Everybody,

   So I have design a puppet module that will create a symlink under a 
given directory, and here's the module and a hiera, and fact data:

Hiera data
---
 confluence_setup::lic::lic_info:
    confluence_lib_path: /usr/local/confluence/confluence/WEB-INF/lib

A custom fact that will return 

mysql_jdbc_connector_path => /usr/share/java/mysql-connector-java-5.1.17.jar
mysql_jdbc_name => mysql-connector-java-5.1.17.jar

Here the puppet manifest that suppose to create a symlink under *
confluence_lib_path*,

# confluence_setup::lic is a module that performs an automaatic
# confluence license installation
class confluence_setup::lic(
  $lic_info = 'UNDEF',
) {

  # fail if $lic_info is unset
  if $lic_info == 'UNDEF' {
    fail( '$lic_info is not set' )
  }

  # fail if $lic_info is not a hash
  if ! is_hash( $lic_info ) {
    fail( '$lic_info has to be a hash' )
  }

  $license_key         = $lic_info['license_key']
  $confluence_lib_path = $lic_info['confluence_lib_path']

  # create a symlink points to mysql_jdbc_connector
*  file { "${::mysql_jdbc_connector_path}":
    ensure => link,
    target => "${confluence_lib_path}/${::mysql_jdbc_name}",
  }
*}

Yet, when ran with this command,

*puppet apply -e 'include confluence_setup::lic' --modulepath 
/vagrant/puppet/modules:/vagrant/puppet/modules/custom_facts/lib 
--environment dev --hiera_config 
/vagrant/puppet/modules/hiera_config/files/hiera.yaml*

Nothing was happened!!  Anybody has any idea why?

Thanks,
Chengkai

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to