Skip to content

Commit 9bcbd62

Browse files
authored
Enable templating for pattern name in pattern.json file (#433)
1 parent cb77f02 commit 9bcbd62

2 files changed

Lines changed: 1 addition & 3 deletions

File tree

src/ansible_creator/resources/common/patterns/sample_pattern/meta/pattern.json renamed to src/ansible_creator/resources/common/patterns/sample_pattern/meta/pattern.json.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"schema_version": "1.0",
3-
"name": "weather_forecasting",
3+
"name": "{{ pattern_name }}",
44
"title": "Weather Forecasting",
55
"description": "This pattern is designed to help get the weather forecast for a given airport code. It creates a project, EE, and job templates in automation controller to get the weather forecast.",
66
"short_description": "This pattern is designed to help get the weather forecast for a given airport code.",

src/ansible_creator/subcommands/add.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -455,8 +455,6 @@ def _get_patterns_template_data(self) -> TemplateData:
455455
return TemplateData(
456456
resource_type=self._resource_type,
457457
pattern_name=self._pattern_name,
458-
namespace=self._namespace,
459-
collection_name=self._collection_name,
460458
creator_version=self._creator_version,
461459
)
462460

0 commit comments

Comments
 (0)