add quotes and remove quotes

This commit is contained in:
m0duspwnens
2020-09-29 16:26:45 -04:00
parent 547c3ff52c
commit bf99bab6c0
2 changed files with 8 additions and 8 deletions

View File

@@ -37,12 +37,12 @@ def run():
# Update the Fleet host in the static pillar
for line in fileinput.input(STATICFILE, inplace=True):
line = re.sub(r'fleet_hostname: \S*', f"fleet_hostname: {HOSTNAME}", line.rstrip())
line = re.sub(r'fleet_hostname: \S*', f"fleet_hostname: '{HOSTNAME}'", line.rstrip())
print(line)
# Update the Fleet IP in the static pillar
for line in fileinput.input(STATICFILE, inplace=True):
line = re.sub(r'fleet_ip: \S*', f"fleet_ip: {MAINIP}", line.rstrip())
line = re.sub(r'fleet_ip: \S*', f"fleet_ip: '{MAINIP}'", line.rstrip())
print(line)
if ACTION == 'genpackages':

View File

@@ -1026,7 +1026,7 @@ host_pillar() {
# Create the host pillar
printf '%s\n'\
"host:"\
" mainint: $MNIC"\
" mainint: '$MNIC'"\
"" > "$pillar_file"
}
@@ -1065,7 +1065,7 @@ manager_pillar() {
" mainip: '$MAINIP'"\
" mainint: '$MNIC'"\
" esheap: '$ES_HEAP_SIZE'"\
" esclustername: '{{ grains.host }}'"\
" esclustername: {{ grains.host }}"\
" freq: 0"\
" domainstats: 0" >> "$pillar_file"
@@ -1088,8 +1088,8 @@ manager_pillar() {
"elasticsearch:"\
" mainip: '$MAINIP'"\
" mainint: '$MNIC'"\
" esheap: $NODE_ES_HEAP_SIZE"\
" esclustername: '{{ grains.host }}'"\
" esheap: '$NODE_ES_HEAP_SIZE'"\
" esclustername: {{ grains.host }}"\
" node_type: '$NODETYPE'"\
" es_port: $node_es_port"\
" log_size_limit: $log_size_limit"\
@@ -1308,8 +1308,8 @@ elasticsearch_pillar() {
"elasticsearch:"\
" mainip: '$MAINIP'"\
" mainint: '$MNIC'"\
" esheap: $NODE_ES_HEAP_SIZE"\
" esclustername: '{{ grains.host }}'"\
" esheap: '$NODE_ES_HEAP_SIZE'"\
" esclustername: {{ grains.host }}"\
" node_type: '$NODETYPE'"\
" es_port: $node_es_port"\
" log_size_limit: $log_size_limit"\