Re: passing environment variable to cfengine daemons

Xander Cage <[email protected]>
Newsgroups gmane.comp.sysutils.cfengine.general
Message-ID <[email protected]>
ashes on my head, but i never heard of that *gg*
can this be set in def.json because..

  notice: Q: ".../cf-agent" -f /":    error: Command related to promiser 
'"/var/cfengine/bin/cf-execd"' returned code '1' defined as promise failed
Q: ".../cf-agent" -f /":   notice: Q: ".../cf-execd"": 
/var/cfengine/inputs/ITSVlib/itsv_reporting.cf:1:0: error: Duplicate 
definition of body control with type agent

and i want to avoid modifying MPF


On Monday, February 14, 2022 at 5:48:30 PM UTC+1 Nick Anderson wrote:

> Xander Cage <[email protected]> writes: 
>
> hi, 
>>
>> because of this 
>> https://sites.ualberta.ca/dept/chemeng/AIX-43/share/man/info/C/a_doc_lib/aixbman/baseadmn/unix95.htm, 
>> i need to pass an environment variable to cf-agent (maybe all the other 
>> daemons) to force aix to spit out iso formattet timestamps in my custom 
>> reporting promises. 
>>
> Hi Chris, 
>
> Did you set environment in body agent control (controls/cf_agent.cf)? 
> Listing 1: Example Policy
>
> body agent control{
>   with_env::
>     environment => { "XPG_SUS_ENV=ON" };}      bundle agent __main__{
>   reports:
>       "ENV XPG_SUS_ENV='$(with)'" with => getenv( "XPG_SUS_ENV", inf );}
>
>
> # cf-agent --no-lock --log-level info --file /tmp/cf-agent-environment-vars.cf
> R: ENV XPG_SUS_ENV=''
>
>
> # cf-agent --define with_env --no-lock --log-level info --file /tmp/cf-agent-environment-vars.cf
> R: ENV XPG_SUS_ENV='ON'
>
>

-- 
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/77bfe647-33ee-48af-91fe-852d90f4b98bn%40googlegroups.com.
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.