Skip to content

Commit 55ae73e

Browse files
fix #239 , use python-style templating instead of Jinja in the ec2 login_cmd_template
This file assumes Jinja templating for the port parameter and passes a Jinja-style "{{ port }}". https://github.com/ansible/molecule/blob/main/src/molecule/command/login.py#L105 When it reaches molecule, it is subsituted in this file and is done by python calling `.format()` on the string. That causes it to not render correctly and gives users issues running molecule login. ref: #239
1 parent b48ead5 commit 55ae73e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/molecule_plugins/ec2/driver.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,10 @@ def login_cmd_template(self):
195195
connection_options = " ".join(self.ssh_connection_options)
196196

197197
return (
198-
"ssh {{address}} "
199-
"-l {{user}} "
200-
"-p {{port}} "
201-
"-i {{identity_file}} "
198+
"ssh {address} "
199+
"-l {user} "
200+
"-p {port} "
201+
"-i {identity_file} "
202202
f"{connection_options}"
203203
)
204204

0 commit comments

Comments
 (0)