Skip to content

Commit

Permalink
Update add.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Shashank Venkat committed Feb 25, 2025
1 parent bb6f258 commit 319d131
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/ansible_creator/subcommands/add.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ def _plugin_scaffold(self, plugin_path: Path) -> None:
elif self._plugin_type == "lookup":
template_data = self._get_plugin_template_data()
self._perform_lookup_plugin_scaffold(template_data, plugin_path)

elif self._plugin_type == "module":
template_data = self._get_plugin_template_data()
self._perform_module_plugin_scaffold(template_data, plugin_path)
Expand Down Expand Up @@ -250,10 +251,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)
plugin_path = self._add_path / "plugins" / "sample_module"
plugin_path.mkdir(parents=True, exist_ok=True)
resources = ("collection_project.plugins.sample_module",)
self._perform_plugin_scaffold(resources, template_data, module_path)
self._perform_plugin_scaffold(resources, template_data, plugin_path)

def _perform_plugin_scaffold(
self,
Expand Down

0 comments on commit 319d131

Please sign in to comment.