PuppetLabs Netscaler Module

71 views
Skip to first unread message

Matthew Ceroni

unread,
Jul 13, 2015, 9:41:49 PM7/13/15
to puppet...@googlegroups.com
I am attempting to use the puppetlabs netscaler module to manage, well a Citrix Netscaler :)

I setup my /etc/puppet/device.conf on the puppet agent that will act as the proxy:

[usc1lb01]
  type netscaler

As a simple test I set my manifest as follows: 

node 'usc1lb01' {
        netscaler_server [ 'server1':
                ensure => present,
                address => '1.10.1.1',
        }
}

I then ran puppet device -v --user=root and received the following error:

Info: starting applying configuration to usc1lb01 at https://10.191.2.8:443/nitro/v1
Error: Could not run: /var/lib/puppet/lib/puppet/util/network_device/transport/netscaler.rb:12: syntax error, unexpected ':', expecting ')'
...@connection = Faraday.new(url: url, ssl: { verify: false }) ...
                              ^
/var/lib/puppet/lib/puppet/util/network_device/transport/netscaler.rb:12: syntax error, unexpected ':', expecting '='
...n = Faraday.new(url: url, ssl: { verify: false }) do |builde...
                              ^
/var/lib/puppet/lib/puppet/util/network_device/transport/netscaler.rb:12: odd number list for Hash
...y.new(url: url, ssl: { verify: false }) do |builder|
                              ^
/var/lib/puppet/lib/puppet/util/network_device/transport/netscaler.rb:13: syntax error, unexpected tSYMBEG, expecting kEND
      builder.request :retry, {
                       ^
/var/lib/puppet/lib/puppet/util/network_device/transport/netscaler.rb:127: syntax error, unexpected kEND, expecting $end


Anyone have success with this module? 


Hunter Haugen

unread,
Jul 13, 2015, 9:45:23 PM7/13/15
to puppet...@googlegroups.com
The module is apparently using ruby >=1.9 hash syntax which is not supported by 1.8 https://github.com/puppetlabs/puppetlabs-netscaler/blob/master/lib/puppet/util/network_device/transport/netscaler.rb#L12

Whoops. You are welcome to send a patch and change all the `url: url` to `:url => url` etc, or just upgrade your ruby to a non-EOL'd version and it should work.

--
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 puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CA%2BNsY5icYrZrW4TbYefskUndwSgiZP-PoSiJw9tMH%2BT19t1uzA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Matthew Ceroni

unread,
Jul 14, 2015, 5:41:19 PM7/14/15
to puppet...@googlegroups.com
I upgraded to ruby 2 that is part of Redhat 7. Now upon running I get the following error

http://pastebin.com/RveUf4ca

Can't autoload puppet/type/netscaler_server.

Thanks

Hunter Haugen

unread,
Jul 14, 2015, 6:06:58 PM7/14/15
to puppet...@googlegroups.com
That error appears to still be the same thing (ruby barfing on the hash argument `parent: Puppet::Provider::Netscaler` . I made https://github.com/puppetlabs/puppetlabs-netscaler/pull/157 to change all the 1.9 hashes to normal hashes, so you can give that a go and see if it works.

--
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 puppet-users...@googlegroups.com.

Matthew Ceroni

unread,
Jul 14, 2015, 11:33:45 PM7/14/15
to puppet...@googlegroups.com
Hi:

Thanks for making that change. I will test it out. 

However with the error I posted today it comes and goes. I will run it one time, and it works. Run it again and it fails with the autoload error. 

Matthew Ceroni

unread,
Jul 15, 2015, 6:19:35 PM7/15/15
to puppet...@googlegroups.com
I tested out your changes. They seem to fix some of the issues but still running into others. Sorry I am not that strong of a Ruby coder. However all the rest.rb files error with the following:


Creating the instances of the type fails. I can't see anything from a syntax point of view that jumps out at me. 

Ramesh Jonathan Godishela

unread,
Jul 15, 2015, 6:32:15 PM7/15/15
to puppet...@googlegroups.com
The opening brace( SQUARE ) and closing brace ( CURLY ) does not match.
Reply all
Reply to author
Forward
0 new messages