Re: Re: variable resolution problem

"vratislav.podzimek via help-cfengine" <[email protected]>
Newsgroups gmane.comp.sysutils.cfengine.general
Message-ID <[email protected]>
On Mon, 2021-07-26 at 05:36 -0700, Xander Cage wrote:
> forgot to mention using sys.date instead works as expected...
> 
> R: Time: Mon Jul 26 14:35:21 2021 -  Bundle: do_what_i_say - Message:
> 
> On Monday, July 26, 2021 at 2:23:31 PM UTC+2 Xander Cage wrote:
> > 
> > hey,
> > 
> > once again, basic principles make me struggle.
> > 
> > so i have this (not global) var definded somewhere in my local "stdlib".
> > 
> > root@aixtest01: /root/cfe_testbed # /var/cfengine/bin/cf-promises --show-vars | grep udate
> > default:itsvrep_c.itsv_udate             2021-07-
> > 26T14:20:03CEST                                      source=promise
> > 
> > i want to use the contents of that var to timestamp my reports.
> > 
> >  reports:
> > 
> >     "$(itsvrep_c.itsv_udate) / $(this.bundle) - Message: Path contains: $(path)" ;
> > 
> > 
> > boom, not working, variable unresolved...
> > 
> > root@aixtest01: /root/cfe_testbed # /var/cfengine/bin/cf-agent -KI -f ./python_symlink_test.cf
> > R: $(itsvrep_c.itsv_udate) / do_what_i_say - Message: Path contains:
> > 
> > so, how to i address this var without making it global?
Is the variable perhaps used in a namespaced bundle/file? If that's the case, you must refer to it
as '$(default:itsvrep_c.itsv_udate)'. 'sys.' and 'this.' variables are an exception and they are
"namespace-agnostic".

--
Vratislav

-- 
You received this message because you are subscribed to the Google Groups "help-cfengine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/help-cfengine/d709bb32c7d3b2e6c1ff8deed100d4b5c2c7ada3.camel%40northern.tech.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.