MCPcopy Create free account
hub / github.com/bvcyber/RedWizard / create_host_string

Function create_host_string

tools/create-ssh-config.py:99–109  ·  view source on GitHub ↗

Create YAML configuration from a Jinja2 template

(hostname, host_vars, codename)

Source from the content-addressed store, hash-verified

97 return yaml.safe_load(stream)
98
99def create_host_string(hostname, host_vars, codename):
100 """
101 Create YAML configuration from a Jinja2 template
102 """
103 if "portforwards" not in host_vars:
104 host_vars["portforwards"] = []
105 return Environment().from_string(HOST_TEMPLATE).render(
106 name=hostname,
107 codename=codename,
108 ip_address=host_vars["address"],
109 portforwards=host_vars["portforwards"])
110
111def create_ssh_config(hosts, codename):
112 """

Callers 1

create_ssh_configFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected