ParsedFile & Multi-line...

59 views
Skip to first unread message

Gavin Williams

unread,
Jan 4, 2013, 11:33:17 AM1/4/13
to puppet...@googlegroups.com
Afternoon all,

I'm currently working on adding oranfstab support to Puppet-Oracle (https://github.com/stschulte/puppet-oracle).

However I'm struggling to get my head around how I can get Puppet parsedfile to work with multi-line configurations...

An example oranfstab configuration block is:
server: stgasm <=== NFS server Host name
path: 10.177.52.158 <--- First path to NFS server ie NFS server NIC
local: 10.177.52.151 <--- First client-side NIC
path: 10.177.52.159 <--- Second path to NFS server ie NFS server NIC (For load balance purpose)
local: 10.177.52.151 <--- Second client-side NIC (For load balance purpose)
export: /oraclenfs mount: /oradata1

'path' and 'local' are optional, but can be specified multiple times aswell...
The final 'export' line is required, and can be provided multiple times for multiple mount points..

So as you can see, there's a fair amount of variability in the file format...

It's also then possible to have multiple 'server/path/local/export' blocks, for example with different filers...

Any ideas on where I could begin? Is parsedfile right for the job, or am I better looking elsewhere?

Thank you in advance for any responses.

Regards
Gavin

Gavin Williams

unread,
Jan 9, 2013, 11:41:20 AM1/9/13
to puppet...@googlegroups.com
Anyone got any ideas???

My next thought is to use something like puppet-concat with an ERB template... However not sure how effective that's going to be...

Cheers
Gavin

Gavin Williams

unread,
Jan 24, 2013, 6:19:19 AM1/24/13
to puppet...@googlegroups.com
Ok, this item is next on my hitlist...

I've been looking at the current oratab provider, and also the cron provider, and in my mind it looks like parsed file should work...

Just need to get my head around it a bit more I think...

Any pointers greatly appreciated.

Cheers
Gavin

Peter Brown

unread,
Jan 24, 2013, 11:31:32 PM1/24/13
to puppet-users
On 10 January 2013 02:41, Gavin Williams <fatm...@gmail.com> wrote:
Anyone got any ideas???

My next thought is to use something like puppet-concat with an ERB template... However not sure how effective that's going to be...

That would probably be pretty easy to setup.
I use concat and templates for a few of my modules, namely my firewall module.
Each rule calls a define i setup to create the rule from a template.

I am on holidays till Wednesday next week and most of my code is at work.
I can send you some examples then.


Cheers
Gavin

On Friday, 4 January 2013 16:33:17 UTC, Gavin Williams wrote:
Afternoon all,

I'm currently working on adding oranfstab support to Puppet-Oracle (https://github.com/stschulte/puppet-oracle).

However I'm struggling to get my head around how I can get Puppet parsedfile to work with multi-line configurations...

An example oranfstab configuration block is:
server: stgasm <=== NFS server Host name
path: 10.177.52.158 <--- First path to NFS server ie NFS server NIC
local: 10.177.52.151 <--- First client-side NIC
path: 10.177.52.159 <--- Second path to NFS server ie NFS server NIC (For load balance purpose)
local: 10.177.52.151 <--- Second client-side NIC (For load balance purpose)
export: /oraclenfs mount: /oradata1

'path' and 'local' are optional, but can be specified multiple times aswell...
The final 'export' line is required, and can be provided multiple times for multiple mount points..

So as you can see, there's a fair amount of variability in the file format...

It's also then possible to have multiple 'server/path/local/export' blocks, for example with different filers...

Any ideas on where I could begin? Is parsedfile right for the job, or am I better looking elsewhere?

Thank you in advance for any responses.

Regards
Gavin

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/xDI6ktYRcVsJ.

To post to this group, send email to puppet...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

fatmcgav

unread,
Jan 25, 2013, 3:45:28 AM1/25/13
to puppet...@googlegroups.com
Peter

That would be great, cheers...

Enjoy ure holiday first though... ;)

Cheers
Gavin


Reply all
Reply to author
Forward
0 new messages