From 139a419036ab43f94c83759b3d975a45e4e188ec Mon Sep 17 00:00:00 2001 From: DJ Lee Date: Thu, 1 Jun 2023 16:46:57 -0400 Subject: [PATCH 1/2] Eliminate escape codes in aws_ssm output caused by newer versions of Bash --- plugins/connection/aws_ssm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/connection/aws_ssm.py b/plugins/connection/aws_ssm.py index 173dd6a084c..263305ab41e 100644 --- a/plugins/connection/aws_ssm.py +++ b/plugins/connection/aws_ssm.py @@ -627,7 +627,7 @@ def _prepare_terminal(self): disable_prompt_complete = None end_mark = "".join([random.choice(string.ascii_letters) for i in xrange(self.MARK_LENGTH)]) disable_prompt_cmd = to_bytes( - "PS1='' ; printf '\\n%s\\n' '" + end_mark + "'\n", + "PS1='' ; bind 'set enable-bracketed-paste off'; printf '\\n%s\\n' '" + end_mark + "'\n", errors="surrogate_or_strict", ) disable_prompt_reply = re.compile(r"\r\r\n" + re.escape(end_mark) + r"\r\r\n", re.MULTILINE) From 376a3f30c020dc553b5258b5335bcadd17c1a1d3 Mon Sep 17 00:00:00 2001 From: DJ Lee Date: Thu, 1 Jun 2023 17:12:16 -0400 Subject: [PATCH 2/2] add changelog --- changelogs/fragments/1839-disable-bracketed-paste.yml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 changelogs/fragments/1839-disable-bracketed-paste.yml diff --git a/changelogs/fragments/1839-disable-bracketed-paste.yml b/changelogs/fragments/1839-disable-bracketed-paste.yml new file mode 100644 index 00000000000..1398fc3ec1d --- /dev/null +++ b/changelogs/fragments/1839-disable-bracketed-paste.yml @@ -0,0 +1,2 @@ +bugfixes: + - aws_ssm - disable `enable-bracketed-paste` to fix issue with amazon linux 2023 and other OSes (https://github.com/ansible-collections/community.aws/issues/1756)