voxpupuli / puppet-augeasproviders_mounttab Goto Github PK
View Code? Open in Web Editor NEWAugeas-based mounttab provider
License: Apache License 2.0
Augeas-based mounttab provider
License: Apache License 2.0
Hello,
does this module allow to mount cifs share on Linux hosts ?
I'm not sure that is currently supported.
Thank you
Hi
Not an issue but I am having trouble understanding how to use it!
Is there a beginners guide because I am feeling stupid...
I keep getting
Error while evaluating a Function Call, Failed to parse inline template: undefined local variable or method `name' for #Puppet::Parser::TemplateWrapper:0x43e5b812 at /etc/puppetlabs/code/environments/production/modules/mount_providers/manifests/do.pp:13:17 at /etc/puppetlabs/code/environments/production/modules/mount_providers/manifests/init.pp:5 on node
Hello all,
Core is now up to [v3.2.0] augeasproviders_core/-/tags/v3.2.0. When will the code and tag be updated?
Thanks,
On my puppet master I have execute these commands:
# puppet -V
3.7.4 (Puppet Enterprise 3.7.2)
Then I install the mounttab as per the doc.
# puppet module install herculesteam/augeasproviders_mounttab
Notice: Preparing to install into /etc/puppetlabs/puppet/environments/production/modules ...
Notice: Downloading from https://forgeapi.puppetlabs.com ...
Notice: Installing -- do not interrupt ...
/etc/puppetlabs/puppet/environments/production/modules
└─┬ herculesteam-augeasproviders_mounttab (v2.0.0)
└─┬ herculesteam-augeasproviders_core (v2.1.2)
└── puppetlabs-stdlib (v4.2.1) [/etc/puppetlabs/puppet/modules]
# puppet agent -t
...
# service pe-puppetserver restart
...
I have even rebooted the puppet master. But when I list out my installed puppet classes I do not see mounttab. I have checked like so:
# cat list-classes.sh
#!/bin/sh
PEFQDN=`hostname -f`
curl -s -X GET -H 'Content-Type: application/json' \
--cert /etc/puppetlabs/puppet/ssl/certs/${PEFQDN}.pem \
--key /etc/puppetlabs/puppet/ssl/private_keys/${PEFQDN}.pem \
--cacert /etc/puppetlabs/puppet/ssl/certs/ca.pem \
https://${PEFQDN}:4433/classifier-api/v1/classes | python -m json.tool
# ./list-classes.sh | grep mounttab
Also if I login into my Puppet Console/dashboard I do not see the class mounttab
anywhere.
And if I write a puppet manifest/class like this ...
class my-fstab (
$spec,
$mount_point,
$vfstype,
$opts,
$dump = 0,
$passno = 0,
) {
mounttab{ "/data" :
ensure => present,
device => $spec,
fstype => $vfstype,
options => $opts,
dump => $dump,
pass => $passno,
provider => augeas,
}
}
... my puppet agent barfs like so:
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type mounttab at /etc/puppetlabs/puppet/modules/my-fstab/manifests/init.pp:26 on node mgmt-el7-001.example.com
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
I am probably doing something wrong and any help is appreciated.
Hey there, really love all these wonderful modules you've created, thank you so much!
I've gotten many of them to work successfully so far (pam, ssh and shellvar), but can't seem to get mounttab to work.
For demonstrational purposes, I'll use a puppet apply
with some dummy data just to check if the class is actually found:
Notice how pam is found correctly after installation:
fots@fotsies-dev-server:~$ puppet apply --modulepath=/home/fots/.puppet/modules -e "pam { '': }"
Error: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type pam at line 1 on node fotsies-dev-server.mydomain.com
Error: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type pam at line 1 on node fotsies-dev-server.mydomain.com
fots@fotsies-dev-server:~$ puppet module install herculesteam-augeasproviders_pam
Notice: Preparing to install into /home/fots/.puppet/modules ...
Notice: Created target directory /home/fots/.puppet/modules
Notice: Downloading from https://forgeapi.puppetlabs.com ...
Notice: Installing -- do not interrupt ...
/home/fots/.puppet/modules
└─┬ herculesteam-augeasproviders_pam (v2.1.0)
└─┬ herculesteam-augeasproviders_core (v2.1.1)
└── puppetlabs-stdlib (v4.6.0)
fots@fotsies-dev-server:~$ puppet apply --modulepath=/home/fots/.puppet/modules -e "pam { '': }"
Notice: Compiled catalog for fotsies-dev-server.mydomain.com in environment production in 0.04 seconds
Notice: Finished catalog run in 0.01 seconds
Error: Failed to apply catalog: No title provided and "Pam[]" is not a valid resource reference
But mounttab simply won't budge:
fots@fotsies-dev-server:~$ puppet apply --modulepath=/home/fots/.puppet/modules -e "mounttab { '': }"
Error: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type mounttab at line 1 on node fotsies-dev-server.mydomain.com
Error: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type mounttab at line 1 on node fotsies-dev-server.mydomain.com
fots@fotsies-dev-server:~$ puppet module install herculesteam-augeasproviders_mounttab
Notice: Preparing to install into /home/fots/.puppet/modules ...
Notice: Downloading from https://forgeapi.puppetlabs.com ...
Notice: Installing -- do not interrupt ...
/home/fots/.puppet/modules
└─┬ herculesteam-augeasproviders_mounttab (v2.0.0)
└── herculesteam-augeasproviders_core (v2.1.1)
fots@fotsies-dev-server:~$ puppet apply --modulepath=/home/fots/.puppet/modules -e "mounttab { '': }"
Error: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type mounttab at line 1 on node fotsies-dev-server.mydomain.com
Error: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type mounttab at line 1 on node fotsies-dev-server.mydomain.com
This is using Ubuntu 14.04 with 3.6.2 but I've had the same results on RHEL 6.6 with Puppet 3.6.2 (provided via RedHat Satellite).
Specifying the provider makes no difference either I'm afraid.
Any ideas?
Thanks so much!
Fotis
Hello again, sorry for opening 2 issues in one day 😄
Suppose I start with this entry in fstab:
/dev/mapper/vg_volgrp01-lv_tmp /tmp ext4 defaults 1 2
And all I want to change is the options, I tried the following:
mounttab { '/tmp':
ensure => present,
options => ['defaults', 'nodev', 'nosuid', 'noexec'],
provider => augeas,
}
However, this changes my pass and dump values too:
Notice: /Stage[main]/Profiles::Base::Compliance::Mounts/Mounttab[/tmp]/options: options changed 'defaults' to 'defaults,nodev,noexec,nosuid'
Notice: /Stage[main]/Profiles::Base::Compliance::Mounts/Mounttab[/tmp]/pass: pass changed '2' to '0'
Notice: /Stage[main]/Profiles::Base::Compliance::Mounts/Mounttab[/tmp]/dump: dump changed '1' to '0'
By comparison, my original augeas version didn't affect these parameters:
augeas { 'set_tmp_mount_options':
context => "/files/etc/fstab/*[file='/tmp']",
changes => [
"rm opt",
"insert opt after vfstype",
"set opt[last()] defaults",
"insert opt after opt[last()]",
"set opt[last()] nodev",
"insert opt after opt[last()]",
"set opt[last()] nosuid",
"insert opt after opt[last()]",
"set opt[last()] noexec",
],
}
Granted it's rather ugly though, hehe 😄
Any help on this one would be awesome, and really sorry again for bothering you today
Cheers
Fotis
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.