diff options
author | kumvijaya <kumvijaya@gmail.com> | 2024-05-21 16:41:14 +0530 |
---|---|---|
committer | kumvijaya <kumvijaya@gmail.com> | 2024-05-21 16:41:14 +0530 |
commit | cc86483fdf7a6bd988f485c06402fd07368dd26e (patch) | |
tree | 9d892a9715106cc67bf1e57b15b999aa7e564057 /data/templates/system | |
parent | 704ca2322d0bebcb923f5136f0f69fb23651a484 (diff) | |
download | vyos-workflow-test-temp-cc86483fdf7a6bd988f485c06402fd07368dd26e.tar.gz vyos-workflow-test-temp-cc86483fdf7a6bd988f485c06402fd07368dd26e.zip |
T6357: create test repository to validate setup
Diffstat (limited to 'data/templates/system')
-rw-r--r-- | data/templates/system/cloud_init_networking.j2 | 9 | ||||
-rw-r--r-- | data/templates/system/curlrc.j2 | 6 | ||||
-rw-r--r-- | data/templates/system/proxy.j2 | 7 | ||||
-rw-r--r-- | data/templates/system/ssh_config.j2 | 6 | ||||
-rw-r--r-- | data/templates/system/sysctl.conf.j2 | 7 |
5 files changed, 35 insertions, 0 deletions
diff --git a/data/templates/system/cloud_init_networking.j2 b/data/templates/system/cloud_init_networking.j2 new file mode 100644 index 0000000..52cce72 --- /dev/null +++ b/data/templates/system/cloud_init_networking.j2 @@ -0,0 +1,9 @@ +network: + version: 2 + ethernets: +{% for iface in ifaces_list %} + {{ iface['name'] }}: + dhcp4: true + match: + macaddress: "{{ iface['mac'] }}" +{% endfor %} diff --git a/data/templates/system/curlrc.j2 b/data/templates/system/curlrc.j2 new file mode 100644 index 0000000..be4efe8 --- /dev/null +++ b/data/templates/system/curlrc.j2 @@ -0,0 +1,6 @@ +{% if http_client.source_interface is vyos_defined %} +--interface "{{ http_client.source_interface }}" +{% endif %} +{% if http_client.source_address is vyos_defined %} +--interface "{{ http_client.source_address }}" +{% endif %} diff --git a/data/templates/system/proxy.j2 b/data/templates/system/proxy.j2 new file mode 100644 index 0000000..0737cd3 --- /dev/null +++ b/data/templates/system/proxy.j2 @@ -0,0 +1,7 @@ +### autogenerated by system_proxy.py ### +{% if url is vyos_defined and port is vyos_defined %} +{# remove http:// prefix so we can inject a username/password if present #} +export http_proxy=http://{{ username ~ ':' ~ password ~ '@' if username is vyos_defined and password is vyos_defined }}{{ url | replace('http://', '') }}:{{ port }} +export https_proxy=$http_proxy +export ftp_proxy=$http_proxy +{% endif %} diff --git a/data/templates/system/ssh_config.j2 b/data/templates/system/ssh_config.j2 new file mode 100644 index 0000000..d3ede09 --- /dev/null +++ b/data/templates/system/ssh_config.j2 @@ -0,0 +1,6 @@ +{% if ssh_client.source_address is vyos_defined %} +BindAddress {{ ssh_client.source_address }} +{% endif %} +{% if ssh_client.source_interface is vyos_defined %} +BindInterface {{ ssh_client.source_interface }} +{% endif %} diff --git a/data/templates/system/sysctl.conf.j2 b/data/templates/system/sysctl.conf.j2 new file mode 100644 index 0000000..db699c3 --- /dev/null +++ b/data/templates/system/sysctl.conf.j2 @@ -0,0 +1,7 @@ +# autogenerated by system_sysctl.py + +{% if parameter is vyos_defined %} +{% for k, v in parameter.items() %} +{{ k }} = {{ v.value }} +{% endfor %} +{% endif %} |