Kyle Purdon
2014-Nov-21  21:46 UTC
[Puppet Users] [puppet apply --ordering = manifest] is not working as expected
TL:DR Using the --ordering = manifest option does not seem to apply to 
module commands.
Using this parameter I would expect puppet to apply my manifest (site.pp) 
in the order it is written (script like execution).
It appears to do so for everything except module commands. The following 
commands get executed after "all done" even though they are commands
in the
middle of the manifest. Both are module commands.
rbenv::plugin { "sstephenson/ruby-build": latest => true }
rbenv::build { $EDB_RUBY_VERSION: global => true }
nsidc_nfs::sharemount { "/disks/backups": project =>
"backups", options =>
"ro" }
Below is my manifest for reference.
include nsidc_nfs
# =============================# EDB VM PUPPET CONFIGURATION
# =============================
# TODO: REPLACE WITH YAML FILE CONFIGS
# USER VARIABLES
$EDB_RUBY_VERSION = "1.9.3-p194"
$INSTALL_EMACS = "false"
$FULL_DATABASE_RECREATE = "true"
$EDB_DATABASE_USERNAME = "kpurdon"
# SET GLOBAL EXEC PATH
Exec { path => [ "/usr/local/rbenv/shims/",
"/usr/local/rbenv/bin/",
"/usr/local/sbin/", "/usr/local/bin/",
"/usr/sbin/", "/usr/bin/", "/sbin/",
"/bin/" ] }
# INSTALL EMACS BECAUSE IT'S THE BEST EDITOR
notify { "installing emacs": }
if str2bool("$INSTALL_EMACS") {
  package { ["emacs24"]: ensure => "present" }
}
# INSTALL RBENV+RUBY-BUILD AND EDB RUBY VERSION
# this is using jdowning/rbenv
notify { "installing rbenv": }
class { "rbenv": latest => true }
rbenv::plugin { "sstephenson/ruby-build": latest => true }
rbenv::build { $EDB_RUBY_VERSION: global => true }
# INSTALL POSTGRESQL+LIBPQDEV
notify { "installing postgres": }
package { ["postgresql-9.3", "libpq-dev"]: ensure =>
"present" }
# INSTALL SQLITE+SPATIALITE
notify { "installing sqlite": }
package { ["sqlite3", "libsqlite3-dev"]: ensure =>
"present" }
package { ["spatialite-bin", "libspatialite5",
"libspatialite-dev"]: ensure
=> "present" }
# INSTALL PROJECT GEMS
notify { "installing edb gems": }
exec { "install edb project gems":
  cwd => "/vagrant",
  command => "bundle install --path=.gems"
}
# MOUNT DISKS/BACKUPS FOR EDB BACKUP ACESS
# /disks/backups/databases/mukluk/pgsql/edb_prod_snapshot_with_granules.DMP
notify { "mounting disks": }
nsidc_nfs::sharemount { "/disks/backups": project =>
"backups", options =>
"ro" }
notify { "setting database user": }
file_line { "export database user env":
  path => "/home/vagrant/.bashrc",
  line => "export DATABASE_ENV=${EDB_DATABASE_USERNAME}"
}
notify { "recreating the database": }
if str2bool("$FULL_DATABASE_RECREATE") {
  #exec { "rake recreate database full":
  #  cwd -> "/vagrant",
  #  command => "rake db:recreate_db['full']"
  #}
}
notify { "all done": }
-- 
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/fe184242-1987-44be-af6c-2eeea34ad2a0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.