Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ If you would like to see what version of CFEngine you are running, type:

Now, you have a client-server CFEngine running. If you would like to install more hosts, simply repeat steps 1 to 3 above. You are free to have up to 25 hosts. Enjoy!

Once you have installed the number of hosts you want, a good next step would be to take a look at our [How-to write your first policy][Writing CFEngine policy] tutorial.
Once you have installed the number of hosts you want, a good next step would be to take a look at our [How-to write your first policy][Introduction to policy writing] tutorial.
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,4 @@ Although most install procedures follow the same general workflow, there are sev

## Next steps

- Learn about [Writing and serving policy][Writing and serving policy]
- Learn about [Writing and serving policy][Policy writing]
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Next steps

- [Writing and serving policy][Writing and serving policy]
- [Writing and serving policy][Policy writing]
- [Examples and tutorials][Examples and tutorials]
- ["Hello World" Tutorial][Examples and tutorials#Tutorial for running examples]

Expand Down
2 changes: 1 addition & 1 deletion content/guide/_index.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ experts if you need more help. Contact us!
- [General installation]
- [Upgrading]
- [Secure bootstrap]
- [Writing and serving policy][]
- [Writing and serving policy][Policy writing]
- [Language concepts][]
- [Promises available in CFEngine][]
- [Authoring policy tools & workflow][]
Expand Down
4 changes: 2 additions & 2 deletions content/overview/_index.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ Those policy files are distributed across all hosts within the system via downlo

CFEngine continually monitors all of the hosts in real-time, and should the system's current state begin to drift away from the intended state then CFEngine will automatically take corrective action to bring everything back into compliance.

See also: [Language concepts][], [Writing and serving policy][]
See also: [Language concepts][], [Writing and serving policy][Policy writing]

## CFEngine policy servers and hosts

There are basically two categories of machines in a CFEngine environment: policy servers and their client hosts. Policy servers are responsible for making policy files available to each of the client hosts that have registered with it (a.k.a. bootstrapped), including itself. Hosts on the other hand are responsible for ensuring they continuously pull in the latest policy files, or changes to them, from the policy server. They are additionally responsible for ensuring they remain fully compliant with the instructions contained within the policy files, at all times.

The role of a particular machine where CFEngine is deployed determines which of the components will be installed and running at any given moment.

See also: [Writing and serving policy][]
See also: [Writing and serving policy][Policy writing]

## CFEngine component applications and daemons

Expand Down
3 changes: 3 additions & 0 deletions generator/_scripts/cfdoc_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ def parseHeader(lines):
return header
if not in_header:
continue
# Skip list items (lines starting with -)
if line.lstrip().startswith("-"):
continue
token_list = line.split(":")
if len(token_list) != 2:
print("parseHeader: ERROR in %s - wrong number of tokens" % line)
Expand Down
17 changes: 10 additions & 7 deletions generator/_scripts/cfdoc_references_resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ def load_references(references_file):
ref, url, title = match.groups()
if title is None:
title = ""
references[ref] = (url, title)
# store with lowercase key for case-insensitive matching
references[ref.lower()] = (url, title)

return references

Expand All @@ -49,15 +50,16 @@ def replace_link(match):
ref or text
) # if ref is empty use text as ref to support cases like [ref][]

if ref in references:
url, title = references[ref]
ref_lower = ref.lower()
if ref_lower in references:
url, title = references[ref_lower]
if title:
return f'[{text}]({url} "{title}")'
else:
return f"[{text}]({url})"
else:
sys.stderr.write(
f"References {ref} is not found in the _references.md. File: {file_path}"
f"References {ref} is not found in the _references.md. File: {file_path}\n"
)
return match.group(0)

Expand All @@ -69,15 +71,16 @@ def replace_link(match):
def replace_function_link(match):
ref = match.group(1)
text = f"{ref}()"
if ref in references:
url, title = references[ref]
ref_lower = ref.lower()
if ref_lower in references:
url, title = references[ref_lower]
if title:
return f'[{text}]({url} "{title}")'
else:
return f"[{text}]({url})"
else:
sys.stderr.write(
f"References {ref} is not found in the _references.md. File: {file_path}"
f"References {ref} is not found in the _references.md. File: {file_path}\n"
)
return match.group(0)

Expand Down
8 changes: 7 additions & 1 deletion generator/_scripts/cfdoc_sourcelinks.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ def addLinkToSource(file_name, config):
break
if line.find("layout: printable") == 0:
return 0
if line.find("published: false") == 0:
return 0

if not html_file:
return 0
Expand All @@ -118,7 +120,11 @@ def addLinkToSource(file_name, config):
unexpanded_macro = unexpandedMacroRegex()

error_count = 0
html_file = config["CFE_DIR"] + "/" + html_file
if html_file.endswith("index.html"):
html_file = config["CFE_DIR"] + "/" + html_file
else:
html_file = config["CFE_DIR"] + "/" + html_file + "/index.html"

try:
in_file = open(html_file, "r")
lines = in_file.readlines()
Expand Down
2 changes: 1 addition & 1 deletion generator/build/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function fetch_file() {
local success=1 # 1 means False in bash, 0 means True
set +e
for i in $(seq 1 "$tries"); do
wget "$target" -O "$destination" && success=0 && break
wget -q "$target" -O "$destination" && success=0 && break
if [ "$i" -lt "$tries" ]; then
sleep 10s
fi
Expand Down