Skip to content

Commit

Permalink
Updated add.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Shashank Venkat committed Feb 25, 2025
1 parent 68c8977 commit bb6f258
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ansible_creator/subcommands/add.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,7 @@ def _plugin_scaffold(self, plugin_path: Path) -> None:
self._perform_lookup_plugin_scaffold(template_data, plugin_path)
elif self._plugin_type == "module":
template_data = self._get_plugin_template_data()
module_path = self._add_path / "plugins" / "sample_module"
module_path.mkdir(parents=True, exist_ok=True)
self._perform_module_plugin_scaffold(template_data, module_path)
self._perform_module_plugin_scaffold(template_data, plugin_path)
else:
msg = f"Unsupported plugin type: {self._plugin_type}"
raise CreatorError(msg)
Expand Down Expand Up @@ -252,8 +250,10 @@ def _perform_module_plugin_scaffold(
template_data: TemplateData,
plugin_path: Path,
) -> None:
module_path = self._add_path / "plugins" / "sample_module"
module_path.mkdir(parents=True, exist_ok=True)
resources = ("collection_project.plugins.sample_module",)
self._perform_plugin_scaffold(resources, template_data, plugin_path)
self._perform_plugin_scaffold(resources, template_data, module_path)

def _perform_plugin_scaffold(
self,
Expand Down

0 comments on commit bb6f258

Please sign in to comment.