mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
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 `""`.
This commit is contained in:
parent
dac226de4a
commit
5f0815d7f4
1 changed files with 1 additions and 1 deletions
|
@ -17,7 +17,7 @@
|
|||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
- 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
|
||||
|
|
Loading…
Reference in a new issue