mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-20 02:39:02 +00:00
[PR #11231/16d51a82 backport][stable-12] remove % templating (#11237)
remove % templating (#11231)
* remove % templating
* add changelog frag
* suggestions from review
* remove unused import
(cherry picked from commit 16d51a8233)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
parent
721d2bd35d
commit
3033dfa27c
3 changed files with 7 additions and 6 deletions
|
|
@ -553,7 +553,7 @@ def _auto_increment_hostname(count, hostname):
|
|||
name-02, name-03, and so forth.
|
||||
"""
|
||||
if "%" not in hostname:
|
||||
hostname = "%s-%%01d" % hostname # noqa
|
||||
hostname = f"{hostname}-%01d"
|
||||
|
||||
return [hostname % i for i in range(1, count + 1)]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue