The problem is that cfengine thinks the RHS of the variable declaration is a body called backup, so the best solution is to rename your body for now. Using execresult is inefficient as it costs you a process.
Jean-Noël Rivasseau wrote: > Hi, I am using 3.0.3 here. > > If I use: > > vars: > "backupHost" string =>"backup"; > > when I have the following defined: > > body perms backup > { > owners => {"backup"}; > groups => {"backup"}; > mode => "go-rwx"; > } > > cf-agent will error out during the parsing phase will the following error: > > Body type mismatch for body reference "backup" in promise at line 46 of > /var/cfengine/inputs/backup.cf <http://backup.cf> > > My current workaround is: > > vars: > "backupHost" string => execresult("/bin/echo backup", "noshell"); > > but obviously it's ugly. Can you fix this? > > Thanks > Jean-Noel > > PS: When will the bugzilla / Mantis or whatever will be ready? > > > ------------------------------------------------------------------------ > > _______________________________________________ > Bug-cfengine mailing list > Bug-cfengine@cfengine.org > https://cfengine.org/mailman/listinfo/bug-cfengine -- Mark Burgess ------------------------------------------------- Professor of Network and System Administration Oslo University College, Norway Personal Web: http://www.iu.hio.no/~mark Office Telf : +47 22453272 ------------------------------------------------- _______________________________________________ Bug-cfengine mailing list Bug-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/bug-cfengine