Skip to content

Commit b1b2715

Browse files
committed
Rename variables and parameters
1 parent 6579027 commit b1b2715

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

containers/proxy-config/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
server: server.tf.local
2-
squid_size: 20000
2+
max_cache_size_mb: 20000

containers/proxy-squid/uyuni-configure.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
1010

1111
# read to existing config file
1212
with open("/etc/squid/squid.conf", "r") as dest:
13-
fileContent = dest.read()
13+
file_content = dest.read()
1414

1515
# adapt the config file
16-
fileContent = re.sub(r"cache_dir ufs .*", f"cache_dir ufs /var/cache/squid {str(config['squid_size'])} 16 256", fileContent)
17-
fileContent = re.sub(r"access_log .*", "access_log stdio:/proc/self/fd/1 squid", fileContent)
16+
file_content = re.sub(r"cache_dir ufs .*", f"cache_dir ufs /var/cache/squid {str(config['max_cache_size_mb'])} 16 256", file_content)
17+
file_content = re.sub(r"access_log .*", "access_log stdio:/proc/self/fd/1 squid", file_content)
1818

1919
# write to file
2020
with open("/etc/squid/squid.conf", "w") as dest:
21-
dest.write(fileContent)
21+
dest.write(file_content)
2222

2323
# make sure "squid" is the user and group owner of the cache squid path
2424
os.system('chown -R squid:squid /var/cache/squid')

0 commit comments

Comments
 (0)