Re: Re: variable resolution problem
Xander Cage <[email protected]>
| Newsgroups | gmane.comp.sysutils.cfengine.general |
|---|---|
| Message-ID | <[email protected]> |
yes, the var is in a namespaced bundle. $(default:itsvrep_c.itsv_udate) doas not work either, but nevermind, i stay with sys.date. On Tuesday, July 27, 2021 at 9:51:12 AM UTC+2 [email protected] wrote: > 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/99037c6c-e8fe-4b7b-aa67-baef41137bf5n%40googlegroups.com.