From 5f0815d7f47ed175d8f896571c86efcd429cfa38 Mon Sep 17 00:00:00 2001 From: Will Thames Date: Wed, 21 Dec 2016 15:29:54 +1000 Subject: [PATCH] Fix too-many-quote problem in setup_ec2 role An inner single-quote pair breaks out of the outer single-quote pair. Rather than escaping the inner quotes to protect against this, just use the fact that `str()` is equivalent to `""`. --- test/integration/roles/setup_ec2/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/integration/roles/setup_ec2/tasks/main.yml b/test/integration/roles/setup_ec2/tasks/main.yml index a41ce0963ef..0f716777538 100644 --- a/test/integration/roles/setup_ec2/tasks/main.yml +++ b/test/integration/roles/setup_ec2/tasks/main.yml @@ -17,7 +17,7 @@ # along with Ansible. If not, see . - name: generate random string - command: '{{ ansible_python.executable }} -c "import string,random; print ''.join(random.choice(string.ascii_lowercase) for _ in range(8));"' + command: '{{ ansible_python.executable }} -c "import string,random; print str().join(random.choice(string.ascii_lowercase) for _ in range(8));"' register: random_string tags: - prepare