mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
committed by
Sam Doran
parent
a8e4c9be7a
commit
09cc84c796
@@ -215,9 +215,6 @@ def main():
|
|||||||
if not new_comment:
|
if not new_comment:
|
||||||
new_comment = old_comment
|
new_comment = old_comment
|
||||||
|
|
||||||
if new_comment:
|
|
||||||
new_comment = "\t#"+new_comment
|
|
||||||
|
|
||||||
line_fields = newline.split(' ')
|
line_fields = newline.split(' ')
|
||||||
|
|
||||||
if len(line_fields) != 4:
|
if len(line_fields) != 4:
|
||||||
@@ -262,6 +259,8 @@ def main():
|
|||||||
# Change line only if value has changed
|
# Change line only if value has changed
|
||||||
if new_value != actual_value:
|
if new_value != actual_value:
|
||||||
changed = True
|
changed = True
|
||||||
|
if new_comment:
|
||||||
|
new_comment = "\t#" + new_comment
|
||||||
new_limit = domain + "\t" + limit_type + "\t" + limit_item + "\t" + new_value + new_comment + "\n"
|
new_limit = domain + "\t" + limit_type + "\t" + limit_item + "\t" + new_value + new_comment + "\n"
|
||||||
message = new_limit
|
message = new_limit
|
||||||
nf.write(new_limit)
|
nf.write(new_limit)
|
||||||
@@ -273,6 +272,8 @@ def main():
|
|||||||
|
|
||||||
if not found:
|
if not found:
|
||||||
changed = True
|
changed = True
|
||||||
|
if new_comment:
|
||||||
|
new_comment = "\t#"+new_comment
|
||||||
new_limit = domain + "\t" + limit_type + "\t" + limit_item + "\t" + new_value + new_comment + "\n"
|
new_limit = domain + "\t" + limit_type + "\t" + limit_item + "\t" + new_value + new_comment + "\n"
|
||||||
message = new_limit
|
message = new_limit
|
||||||
nf.write(new_limit)
|
nf.write(new_limit)
|
||||||
|
|||||||
Reference in New Issue
Block a user