This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmdln@ThinkPad-W520:~/.cfagent/inputs$ cf-agent -KIf ./test_append_lines.cf | |
-> Created file /tmp/test1, mode = 600 | |
-> Edited file /tmp/test1 | |
-> Created file /tmp/test2, mode = 600 | |
-> Edited file /tmp/test2 | |
-> Edited file /tmp/test2 | |
-> Edited file /tmp/test2 | |
cmdln@ThinkPad-W520:~/.cfagent/inputs$ cat /tmp/test1 | |
L1i1 | |
L1i2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cf-agent -KIf test_override2.cf | |
R: conf[_motd_file]: /etc/motd | |
R: conf[_custom_content_file]: /etc/motd.custom | |
R: conf[_motd_template_file]: /etc/motd_template.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body common control { | |
bundlesequence => { | |
"main", | |
}; | |
inputs => { | |
"cfengine_stdlib.cf", | |
}; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
R: test1 conf[value1]: overriden value1 | |
R: test1 conf[value2]: default value2 | |
R: test2 conf[value1]: default value1 | |
R: test2 conf[value2]: default value2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body classes if_repaired_kept(repaired, kept){ | |
promise_repaired => { "$(repaired)" }; | |
promise_kept => { "$(kept)" }; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/sbin/cf-agent -KIf | |
body common control { | |
bundlesequence => { | |
"main", | |
}; | |
} | |
bundle agent main { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body common control { | |
bundlesequence => { | |
"main", | |
}; | |
inputs => { | |
"cfengine_stdlib.cf", | |
}; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body common control { | |
bundlesequence => { | |
"main", | |
}; | |
inputs => { | |
"cfengine_stdlib.cf", | |
}; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bundle edit_line set_variable_values2(file,v) | |
# | |
# Another implementation of set_variable_values. | |
# The input and output should be exactly the same (except the file name), | |
# but in some Cfengine versions there are bugs, | |
# so this bundle can be used as a workaround. | |
# | |
{ | |
vars: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bundle agent local_user_management_add_users_fileedit (users) { | |
# Expects to be passed a two-dimensional array keyed on username and field | |
# The following fields are required. | |
# gecos, uid, gid, home, shell, passwdhash | |
# Dependancies: replace_or_add from copbl svn 105 or greater, perl | |
# Example Usage: | |
# vars: | |
# "users[testuser][gecos]" string => "My Test User"; | |
# "users[testuser][uid]" string => "1500"; | |
# "users[testuser][gid]" string => "1500"; |