Issue #20779 has been updated by Charlie Sharpsteen.

Status changed from Unreviewed to Rejected
Assignee set to Charlie Sharpsteen

The `settings` class contains information derived from settings and command 
line arguments that were passed to the process hosting the compiler. The 
documentation describes [the situation in 
detail](http://docs.puppetlabs.com/puppet/2.7/reference/lang_variables.html#master-set-variables),
 but the important summary is:

> Note that, other than $environment, the agent node’s settings are not 
> available in manifests.

With `puppet apply`, you get the value of `--tags` because both compilation and 
catalog application are happening inside the same process and there is no split 
between "master settings" and "agent settings".

----------------------------------------
Bug #20779: --tags available with puppet apply but not with puppet agent
https://projects.puppetlabs.com/issues/20779#change-91183

* Author: Benjamin Pillet
* Status: Rejected
* Priority: Normal
* Assignee: Charlie Sharpsteen
* Category: 
* Target version: 
* Affected Puppet version: 2.7.17
* Keywords: 
* Branch: 
----------------------------------------
I have code in a catalog that logs the tags and the logdir settings:
err("tags: ${settings::tags} logdir ${settings::logdir}")

When I run the catalog with "puppet apply --tags=foo", it logs
"tags: foo logdir: /var/log/puppet"

But, when I run the catalog remotely with "puppet agent --tags=foo -tv", it logs
"tags:  logdir: /var/log/puppet"

Shouldn't the settings::tags be available too?


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to