Phil Swenson
2014-Sep-10 14:42 UTC
[Puppet Users] new to puppet - simple ordering question
Hi, I have a puppet file I'm running via vagrant that sets up oracle and changes the system password. I need to make sure that the "oracle-xe" service is running before executing my password change script via sql plus. Here is the code: service {'oracle-xe': ensure => running } service {'iptables': ensure => stopped } exec {"changeDbPassword": environment => ["ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe", "ORACLE_SID=XE"], command => "sqlplus -s /nolog <<EOF connect sa/sa ALTER USER system IDENTIFIED BY mypassword; quit EOF", path => "/u01/app/oracle/product/11.2.0/xe/bin/", logoutput => 'true' } This code works, but my understanding that the ordering isn't guaranteed, so how do I make sure that the exec command runs AFTER the oracle-xe service command? Please let me know of other improvements - guessing that I can reference the environment variable instead of repeating it in the path => "/u01/app/oracle/product/11.2.0/xe/bin/" Thanks! phil -- 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/8f702cfc-21af-4595-96ed-f6ff79d92108%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.