On 3/2/17 9:58 AM, warron.french wrote:
> Hello all,
> can someone please advise me on a proper set of syntax (a file to look
> at) for an example to follow to solve the following challenge:
>
> 1. I have 2 deliver 2 *.rpm files that are not in a YUM repository, so
> I dropped them into the files directory of my module path.
> 2. I need to be able to execute each of them either together, or
> _A.rpm before B.rpm_
> 3. __Then execute a shell script that requires the 2 RPMs to be in
> place before that happens.
>
> I am starting to get into slightly more complicated modules, instead of
> simply delivering basic ASCII text files using *content =>
> template('modulename/some.erb')*.
>
> I just need an example that is know to provide proper execution, proper
> syntax, and something I can learn from correctly. I am still building
> the foundation of my understanding, so troubleshooting someone else's
> code isn't going to be too good for my development yet.
>
>
> Thank you in advance,
> --------------------------
> Warron French
>
Hi Warron,
What you want to accomplish is a bad idea and you should use a yum repo
and definitely not check in binary data with your modules. You could at
least store the rpm's somewhere and then download them from that
canonical source. Take a look at Artifactory which can help with where
to store things such as your random rpm's.
Sometimes you have to automate what you have before you build something
better. Suggest writing an exec resource that can handle what you are
trying to do. The key here is to have two commands. One that checks to
see if you are already in the desired state and another to get you to
the desired state. Figure that out without Puppet and once you have
those commands, you can write a manifest.
Best regards,
-g
--
Garrett Honeycutt
@learnpuppet
Puppet Training with LearnPuppet.com
Mobile:
+1.206.414.8658