Skip to content

Commit

Permalink
README.md: Simplified hello world example
Browse files Browse the repository at this point in the history
There's no need to try to introduce as much syntax as possible
in this example. Hello world can and should be simple.

Changelog: None
Ticket: None
Signed-off-by: Ole Herman Schumacher Elgesem <[email protected]>
  • Loading branch information
olehermanse committed Apr 25, 2024
1 parent d7227da commit d65bbb0
Showing 1 changed file with 11 additions and 15 deletions.
26 changes: 11 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,28 +48,24 @@ $ pwd
<something>/core
$ echo "cd $(pwd); cf-promises/cf-promises \"\$@\"" > ~/.cfagent/bin/cf-promises


### Hello World

The following code demonstrates simple CFEngine output through a reports promise.

body common control
{
bundlesequence => { "run" };
}

bundle agent run
{
reports:
cfengine::
"Hello, world";
}
```cfengine3
bundle agent main
{
reports:
"Hello, world";
}
```

The following policy code may be executed with cf-agent (the main CFEngine binary) as follows.

$ cf-agent/cf-agent hello.cf
R: Hello, world

```bash
$ cf-agent/cf-agent hello.cf
R: Hello, world
```

## Debugging

Expand Down

0 comments on commit d65bbb0

Please sign in to comment.