Re: passing environment variable to cfengine daemons
Xander Cage <[email protected]>
| Newsgroups | gmane.comp.sysutils.cfengine.general |
|---|---|
| Message-ID | <[email protected]> |
setting this in my local def.cf seems to not have any effects...
root@aixstp19prdbc2: /var/cfengine # /var/cfengine/bin/cf-agent -KI
--show-evaluated-vars=environment
...
Variable name Variable value
Meta tags Comment
default:def.environment {"XPG_SUS_ENV=ON"}
source=promise aix is
not unix horseshit
default:stdlib_common.input[guest_environments]
/var/cfengine/inputs/lib/guest_environments.cf source=promise
On Tuesday, February 15, 2022 at 9:11:59 AM UTC+1 Xander Cage wrote:
> 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/046c863b-aab2-405a-8ed0-8ff1de77bd55n%40googlegroups.com.