ssg/yaml.py 1 location
|
@@ 200-210 (lines=11) @@
|
| 197 |
|
return list(one_or_more_strings) |
| 198 |
|
|
| 199 |
|
|
| 200 |
|
def update_yaml_list_or_string(current_contents, new_contents): |
| 201 |
|
result = [] |
| 202 |
|
if current_contents: |
| 203 |
|
result += _strings_to_list(current_contents) |
| 204 |
|
if new_contents: |
| 205 |
|
result += _strings_to_list(new_contents) |
| 206 |
|
if not result: |
| 207 |
|
result = "" |
| 208 |
|
if len(result) == 1: |
| 209 |
|
result = result[0] |
| 210 |
|
return result |
| 211 |
|
|
ssg/ansible.py 1 location
|
@@ 67-77 (lines=11) @@
|
| 64 |
|
return list(one_or_more_strings) |
| 65 |
|
|
| 66 |
|
|
| 67 |
|
def update_yaml_list_or_string(current_contents, new_contents): |
| 68 |
|
result = [] |
| 69 |
|
if current_contents: |
| 70 |
|
result += _strings_to_list(current_contents) |
| 71 |
|
if new_contents: |
| 72 |
|
result += _strings_to_list(new_contents) |
| 73 |
|
if not result: |
| 74 |
|
result = "" |
| 75 |
|
if len(result) == 1: |
| 76 |
|
result = result[0] |
| 77 |
|
return result |
| 78 |
|
|
| 79 |
|
|
| 80 |
|
class AnsibleRemediation(object): |