Richie
2014-Jun-06 14:30 UTC
[Puppet Users] Extracting gzipped sql archive, importing and finally deleting
I'm a little stuck with a puppet manifest due to the declarative nature of things and it's taking some time for the concept to fully sink in so could someone guide me in the right direction here (if this is the correct route of course). At the moment the setup is using vagrant, puppet and modules from puppet forge. The site manifest declares your typical LAMP stack which in it's most basic form works fine using the puppet modules and configuring accordingly. Currently I have a 'files/mysql/backup.sql.gz' structure inside Vagrantfile root dir and unfortunately the gz won't extract to /tmp/ using the /vagrant/files/mysql/back.sql.gz path as it's not recognised even though ssh'ing in reveals it - at a guess shares aren't active whilst provisioning? Following the successful extraction of the sql backup I'd like to import it then remove all traces of it so I guess the big question here would be is a routine task like this of scope for puppet and if not what approach should one taken given you can't declare the same resource twice (e.g. file { '/tmp/backup.sql':... ), one to ensure it exists and the other to ensure it's deleted. Thanks, any help appreciated. -- 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+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/707c54cc-6c07-424c-a12a-617516d4aee7%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.