Skip to content

Commit

Permalink
Ran markdowner.py to add newlines before command blocks
Browse files Browse the repository at this point in the history
Signed-off-by: Ole Herman Schumacher Elgesem <[email protected]>
  • Loading branch information
olehermanse committed Jan 15, 2024
1 parent dd1acc7 commit c6a7fe1
Show file tree
Hide file tree
Showing 15 changed files with 39 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ Now press "esc" to exit the "Insert" mode, then type ```:w``` to save the file c
Exit vi by typing ```:q``` then "Enter." This will return to the prompt.

Execute the following command:

```command
/var/cfengine/bin/cf-agent --no-lock --file ./hello_world.cf
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ If any of these classes becomes defined, it will cause the current bundle to be
[%CFEngine_include_example(abort.cf)%]

This is how the policy runs when the userlist is valid:

```command
cf-agent -f unit_abort.cf
```
Expand All @@ -22,6 +23,7 @@ R: User name mark is valid at 4 letters
R: User name john is valid at 4 letters
```
This is how the policy runs when the userlist contains an invalid entry:

```command
cf-agent -f unit_abort.cf
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ cf-agent -f unit_change_detect.cf
2013-06-06T20:53:26-0700 error: /example/files/'/etc/example':
File '/etc/example/example.conf' was not in 'md5' database - new file found
```

```command
cf-agent -f unit_change_detect.cf -K
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ cf-agent -f unit_diskfree.cf
```output
R: Freedisk 48694692
```

```command
df -k /tmp
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,27 +75,31 @@ service sysstat status; echo $?
```output
3
```

```command
service httpd status; echo $?
```
```output
httpd (pid 3740) is running...
0
```

```command
service cups status; echo $?
```
```output
cupsd (pid 3762) is running...
0
```

```command
service sshd status; echo $?
```
```output
openssh-daemon (pid 3794) is running...
0
```

```command
service crond status; echo $?
```
Expand Down Expand Up @@ -128,27 +132,31 @@ service sysstat status; echo $?
```output
3
```

```command
service httpd status; echo $?
```
```output
httpd is stopped
3
```

```command
service cups status; echo $?
```
```output
cups is stopped
3
```

```command
service sshd status; echo $?
```
```output
openssh-daemon (pid 3794) is running...
0
```

```command
service crond status; echo $?
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,11 @@ Removing ntp ...
Processing triggers for ureadahead ...
Processing triggers for man-db ...
```

```command
cf-agent -f install_packages.cf # install packages
```

```command
dpkg -l lynx ntp # show installed packages
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,14 @@ cf-agent -f example_mount_nfs.cf
```output
2013-06-08T17:48:42-0700 error: Attempting abort because mount went into a retry loop.
```

```command
grep mnt /etc/fstab
```
```output
fileserver:/home /mnt nfs rw
```

```command
df |grep mnt
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Example run:
```output
[1] 5370
```

```command
cf-agent -f unit_process_kill.cf
```
Expand All @@ -52,6 +53,7 @@ Now let's do it again with inform mode turned on, and CFEngine will show the pro
```output
[1] 5377
```

```command
cf-agent -f unit_process_kill.cf -IK
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ And again, in Inform mode:
```command
kill 8008
```

```command
cf-agent -f unit_process_restart.cf -I
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ git clone url
```

or

```command
git pull origin master
```
Expand Down Expand Up @@ -219,34 +220,40 @@ This tracker allows you to see how the policy reacts as it is activated on your
### Deploy changes (Enterprise and Community Users)

Always inspect what you expect. `git status` shows the status of your current branch.

```command
git status
```

Inspect the changes contained in each file.

```command
git diff file
```

Once satisfied, add them to Git's commit staging area.

```command
git add file
```

Iterate over using git **diff**, **add**, and **status** until all of the changes that you
expected are listed as **Changes to be committed**. Check the status once more before you
commit the changes.

```command
git status
```

Commit the changes to your local repository.

```command
git commit
```

Push the changes to the central repository so they can be pulled down to
your policy server for distribution.

```command
git push origin master
```
4 changes: 4 additions & 0 deletions examples/tutorials/manage-ntp.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,7 @@ cf-agent -KIf update.cf;
```output
info: Copied file '/var/cfengine/masterfiles/services/ntp.cf' to '/var/cfengine/inputs/services/ntp.cf.cfnew' (mode '600')
```

```command
cf-agent -KI
```
Expand Down Expand Up @@ -653,6 +654,7 @@ cf-agent -KIf update.cf
info: Copied file '/var/cfengine/masterfiles/services/ntp.cf' to '/var/cfengine/inputs/services/ntp.cf.cfnew' (mode '600')
info: Copied file '/var/cfengine/masterfiles/def.json' to '/var/cfengine/inputs/def.json.cfnew' (mode '600')
```

```command
cf-agent -KI
```
Expand Down Expand Up @@ -708,6 +710,7 @@ python -m json.tool < def.json
}
}
```

```command
cf-agent -KI
```
Expand All @@ -720,6 +723,7 @@ R: NTP service restarted after configuration change
info: Can not acquire lock for 'ntp' package promise. Skipping promise evaluation
info: Can not acquire lock for 'ntp' package promise. Skipping promise evaluation
```

```command
grep -P "^(driftfile|server)" /etc/ntp.conf
```
Expand Down
3 changes: 3 additions & 0 deletions examples/tutorials/manage-packages.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,11 @@ yum list installed | grep openssl
openssl.x86_64 1.0.0-27.el6 @anaconda-CentOS-201303020151.x86_64/6.4
openssl-devel.x86_64 1.0.0-27.el6 @anaconda-CentOS-201303020151.x86_64/6.4
```

```command
cf-agent -K ./manage_packages.cf
```

```command
yum list installed | grep openssl
```
Expand All @@ -69,6 +71,7 @@ yum list installed | grep telnet
```output
telnet.x86_64 1:0.17-48.el6 @base
```

```command
which telnet
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,18 @@ B) Or, change the remote url to `https://GitUserName@password:github.com/GitUser
#### Create a Remote in Masterfiles on the Hub to Masterfiles on GitHub ####

1. Change back to the `masterfiles` directory, if not already there:

```command
cd /var/cfengine/masterfiles
```
2. Create the remote using the following pattern:

```command
git remote add upstream ssh://[email protected]/GitUserName/cfengine-masterfiles.git
```

3. Verify the remote was registered properly:

```command
git remote -v
```
Expand Down
1 change: 1 addition & 0 deletions web-ui/custom-actions-for-alerts.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ Given an alert that triggers on a policy bundle being not kept (failed), the fol

Saving this as a file, e.g. 'alert_parameters_test', can be useful while writing and testing your Custom action script.
You could then simply test your Custom action script, e.g. 'cfengine_custom_action_ticketing.py', by running

```command
./cfengine_custom_action_ticketing alert_parameters_test
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ each host to download new data.


To collect reports from any host manually, run the following:

```command
/var/cfengine/bin/cf-hub -H <host IP>
```
Expand Down

0 comments on commit c6a7fe1

Please sign in to comment.