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 # Update the Fleet host in the static pillar
for line in fileinput.input(STATICFILE, inplace=True): 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) print(line)
# Update the Fleet IP in the static pillar # Update the Fleet IP in the static pillar
for line in fileinput.input(STATICFILE, inplace=True): 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) print(line)
if ACTION == 'genpackages': if ACTION == 'genpackages':

View File

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