{"action":"opened","issue":{"url":"https://api.github.com/repos/fraenki/puppet-proftpd/issues/10","repository_url":"https://api.github.com/repos/fraenki/puppet-proftpd","labels_url":"https://api.github.com/repos/fraenki/puppet-proftpd/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/fraenki/puppet-proftpd/issues/10/comments","events_url":"https://api.github.com/repos/fraenki/puppet-proftpd/issues/10/events","html_url":"https://github.com/fraenki/puppet-proftpd/issues/10","id":138468902,"number":10,"title":"Validate_cmd causing issues","user":{"login":"cdenneen","id":720097,"avatar_url":"https://avatars.githubusercontent.com/u/720097?v=3","gravatar_id":"","url":"https://api.github.com/users/cdenneen","html_url":"https://github.com/cdenneen","followers_url":"https://api.github.com/users/cdenneen/followers","following_url":"https://api.github.com/users/cdenneen/following{/other_user}","gists_url":"https://api.github.com/users/cdenneen/gists{/gist_id}","starred_url":"https://api.github.com/users/cdenneen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdenneen/subscriptions","organizations_url":"https://api.github.com/users/cdenneen/orgs","repos_url":"https://api.github.com/users/cdenneen/repos","events_url":"https://api.github.com/users/cdenneen/events{/privacy}","received_events_url":"https://api.github.com/users/cdenneen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-04T12:55:33Z","updated_at":"2016-03-04T12:55:33Z","closed_at":null,"body":"@fraenki noticing odd behavior that I'm not sure where issue lies. It might not be your module and might be a puppet bug but wanted to reference.\r\n\r\nIf you enable module loading (let's use the user example given in #8):\r\n```yaml\r\n---\r\nproftpd::load_modules:\r\n  sql:\r\n    order: 1\r\n  sql_mysql:\r\n    order: 2\r\n  quotatab:\r\n    order: 3\r\n  quotatab_sql:\r\n    order: 4\r\n  rewrite:\r\n    order: 5\r\n```\r\nThe validate_cmd complains on initial provision that it can't find the Included modules.conf but in looking at your config.pp it clearly states that modules.conf is before proftpd::config because of just this exact reason.\r\nIt's almost like it's not honoring that before statement?\r\n\r\n```puppet\r\n==> default: Info: Computing checksum on file /etc/proftpd.conf\r\n==> default: Info: /Stage[main]/Proftpd::Config/File[/etc/proftpd.conf]: Filebucketed /etc/proftpd.conf to puppet with sum 739256bad808470546c286093a2c1d34\r\n==> default: Debug: Executing: '/usr/sbin/proftpd -t -c /etc/proftpd.conf20160304-4276-iney4d'\r\n==> default: Notice: /Stage[main]/Proftpd::Config/File[/etc/proftpd.conf]/mode: mode changed '0640' to '0644'\r\n==> default: Debug: Class[Proftpd::Config]: Resource is being skipped, unscheduling all events\r\n==> default: Info: Class[Proftpd::Config]: Unscheduling all events on Class[Proftpd::Config]\r\n==> default: Debug: Class[Proftpd::Service]: Resource is being skipped, unscheduling all events\r\n==> default: Notice: /Stage[main]/Proftpd::Service/Service[proftpd]: Dependency File[/etc/proftpd.conf] has failures: true\r\n==> default: Debug: /Stage[main]/Proftpd::Service/Service[proftpd]: Resource is being skipped, unscheduling all events\r\n==> default: Info: /Stage[main]/Proftpd::Service/Service[proftpd]: Unscheduling all events on Service[proftpd]\r\n==> default: Debug: Class[Proftpd::Service]: Resource is being skipped, unscheduling all events\r\n==> default: Error: Execution of '/usr/sbin/proftpd -t -c /etc/proftpd.conf20160304-4276-iney4d' returned 1: Checking syntax of configuration file\r\n==> default: 2016-03-04 12:47:29,201 localhost.localdomain proftpd[5663]: warning: unable to include '/etc/proftpd/modules.conf': No such file or directory\r\n==> default: 2016-03-04 12:47:29,201 localhost.localdomain proftpd[5663]: fatal: unknown configuration directive 'SQLBackend' on line 35 of '/etc/proftpd.conf20160304-4276-iney4d'\r\n==> default: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/execution.rb:216:in `execute'\r\n==> default: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/file.rb:804:in `block in write'\r\n==> default: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:388:in `replace_file'\r\n==> default: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/file.rb:798:in `write'\r\n==> default: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/file/content.rb:154:in `sync'\r\n==> default: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:209:in `sync'\r\n==> default: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:134:in `sync_if_needed'\r\n==> default: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:89:in `block in perform_changes'\r\n==> default: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:88:in `each'\r\n==> default: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:88:in `perform_changes'\r\n==> default: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:20:in `evaluate'\r\n==> default: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:204:in `apply'\r\n==> default: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:220:in `eval_resource'\r\n==> default: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:147:in `call'\r\n==> default: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:147:in `block (2 levels) in evaluate'\r\n==> default: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:292:in `block in thinmark'\r\n==> default: /opt/puppetlabs/puppet/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'\r\n==> default: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:291:in `thinmark'\r\n==> default: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:147:in `block in evaluate'\r\n==> default: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/graph/relationship_graph.rb:118:in `traverse'\r\n==> default: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:138:in `evaluate'\r\n==> default: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:178:in `block in apply'\r\n==> default: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/log.rb:153:in `with_destination'\r\n==> default: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/report.rb:107:in `as_logging_destination'\r\n==> default: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:177:in `apply'\r\n==> default: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:119:in `block in apply_catalog'\r\n==> default: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:129:in `block in benchmark'\r\n==> default: /opt/puppetlabs/puppet/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'\r\n==> default: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:128:in `benchmark'\r\n==> default: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:118:in `apply_catalog'\r\n==> default: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:228:in `run_internal'\r\n==> default: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:134:in `block in run'\r\n==> default: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:64:in `override'\r\n==> default: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:223:in `override'\r\n==> default: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:133:in `run'\r\n==> default: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:343:in `apply_catalog'\r\n==> default: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:274:in `block in main'\r\n==> default: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:64:in `override'\r\n==> default: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:223:in `override'\r\n==> default: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:225:in `main'\r\n==> default: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:170:in `run_command'\r\n==> default: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:344:in `block in run'\r\n==> default: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:446:in `exit_on_fail'\r\n==> default: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:344:in `run'\r\n==> default: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:128:in `run'\r\n==> default: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:72:in `execute'\r\n==> default: /opt/puppetlabs/puppet/bin/puppet:5:in `<main>'\r\n==> default: Error: /Stage[main]/Proftpd::Config/File[/etc/proftpd.conf]/content: change from {md5}739256bad808470546c286093a2c1d34 to {md5}17b7ca200d22fcc798ce4e5f63c8696f failed: Execution of '/usr/sbin/proftpd -t -c /etc/proftpd.conf20160304-4276-iney4d' returned 1: Checking syntax of configuration file\r\n==> default: 2016-03-04 12:47:29,201 localhost.localdomain proftpd[5663]: warning: unable to include '/etc/proftpd/modules.conf': No such file or directory\r\n==> default: 2016-03-04 12:47:29,201 localhost.localdomain proftpd[5663]: fatal: unknown configuration directive 'SQLBackend' on line 35 of '/etc/proftpd.conf20160304-4276-iney4d'\r\n==> default: Warning: /Stage[main]/Proftpd::Service/Service[proftpd]: Skipping because of failed dependencies\r\n==> default: Notice: /Stage[main]/Proftpd::Config/Concat[/etc/proftpd/modules.conf]/File[/etc/proftpd/modules.conf]/ensure: defined content as '{md5}19c94a6eedca04d2dce93f064387263c'\r\n```\r\n\r\nAs you can see this is the source of the error:\r\n```\r\nExecution of '/usr/sbin/proftpd -t -c /etc/proftpd.conf20160304-4276-iney4d' returned 1: Checking syntax of configuration file\r\n==> default: 2016-03-04 12:47:29,201 localhost.localdomain proftpd[5663]: warning: unable to include '/etc/proftpd/modules.conf': No such file or directory\r\n```\r\nAnd a few lines down it writes out the file:\r\n```\r\n==> default: Notice: /Stage[main]/Proftpd::Config/Concat[/etc/proftpd/modules.conf]/File[/etc/proftpd/modules.conf]/ensure: defined content as '{md5}19c94a6eedca04d2dce93f064387263c'\r\n```"}}