Forum: CFEngine Help
Subject: Re: variables changing between passes
Author: neilhwatson
Link to topic: https://cfengine.com/forum/read.php?3,22924,22926#msg-22926

Sorry my mistake.  Here is the correct version, that works.  Rename the script 
and use it in the variable name.

neil@ettin ~/.cfagent/inputs $ cat passwd-get.cf 
body common control {

    bundlesequence => {
        "recipe",
    };

    inputs => {
        "cfengine_stdlib.cf",
    };
}

bundle agent recipe {

    commands:
        "/home/neil/bin/apg_cf" module => "true";

    reports:
        linux::
            "Password is ${apg_cf.pw}";
}

community>     Promise made by: /home/neil/bin/apg_cf
community>     .........................................................
community> 
community>  -> Executing '/home/neil/bin/apg_cf' 
...(timeout=-678,owner=-1,group=-1
community>  -> (Setting umask to 77)
community> Defined variable: pw in context apg_cf with value: danEcVatweynVef
community> M "/home/neil/bin/apg_cf":
community>  -> Finished command related to promiser "/home/neil/bin/apg_cf" -- 
succ
community>  -> Completed execution of /home/neil/bin/apg_cf
community> 
community>    =========================================================
community>    reports in bundle recipe (1)
community>    =========================================================
community> 
community> 
community>     .........................................................
community>     Promise handle: 
community>     Promise made by: Password is danEcVatweynVef
community>     .........................................................
community> 
community> Reporting about this...
community> R: Password is danEcVatweynVef


_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to