Skip to content

Commit

Permalink
Merge branch 'main' into action_plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
shatakshiiii committed Jan 6, 2025
2 parents 414d576 + a37817f commit 6100e07
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 10 deletions.
12 changes: 6 additions & 6 deletions .config/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ flake8==7.1.1
ghp-import==2.1.0
griffe==1.5.4
htmlmin2==0.1.13
identify==2.6.3
identify==2.6.5
idna==3.10
iniconfig==2.0.0
isort==5.13.2
Expand All @@ -60,13 +60,13 @@ mkdocs-minify-plugin==0.8.0
mkdocs-monorepo-plugin==1.1.0
mkdocstrings==0.27.0
mkdocstrings-python==1.13.0
mypy==1.14.0
mypy==1.14.1
mypy-extensions==1.0.0
nodeenv==1.9.1
packaging==24.2
paginate==0.5.7
pathspec==0.12.1
pillow==11.0.0
pillow==11.1.0
pip-tools==7.4.1
pipdeptree==2.24.0
platformdirs==4.3.6
Expand All @@ -89,7 +89,7 @@ pyyaml==6.0.2
pyyaml-env-tag==0.1
regex==2024.11.6
requests==2.32.3
ruff==0.8.4
ruff==0.8.6
six==1.17.0
soupsieve==2.6
termcolor==2.5.0
Expand All @@ -99,10 +99,10 @@ toml-sort==0.24.2
tomli==2.2.1
tomlkit==0.13.2
tox==4.23.2
types-pyyaml==6.0.12.20241221
types-pyyaml==6.0.12.20241230
typing-extensions==4.12.2
urllib3==2.3.0
virtualenv==20.28.0
virtualenv==20.28.1
watchdog==6.0.0
webencodings==0.5.1
wheel==0.45.1
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# GNU General Public License v3.0+

DOCUMENTATION = """
module: hello_world
author: Ansible Core Team
version_added: "1.0.0"
short_description: A custom action plugin for Ansible.
description:
- This is a custom action plugin to provide action functionality.
notes:
- This is a scaffold template. Customize the plugin to fit your needs.
"""

EXAMPLES = """
- name: Example Action Plugin
hosts: localhost
tasks:
- name: Example hello_world plugin
with_prefix:
prefix: "Hello, World"
msg: "Ansible!"
"""
9 changes: 5 additions & 4 deletions src/ansible_creator/subcommands/add.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ def _plugin_scaffold(self, plugin_path: Path) -> None:
Raises:
CreatorError: If unsupported plugin type is given.
"""
# fix this: The following line needs to be corrected
self.output.debug(f"Started copying {self._project} plugin to destination")

# Call the appropriate scaffolding function based on the plugin type
Expand Down Expand Up @@ -270,10 +271,10 @@ def _get_devcontainer_template_data(self) -> TemplateData:
)

def _get_plugin_template_data(self) -> TemplateData:
"""Get the template data for lookup plugin.
"""Get the template data for plugin.
Returns:
TemplateData: Data required for templating the lookup plugin.
TemplateData: Data required for templating the plugin.
"""
return TemplateData(
plugin_type=self._plugin_type,
Expand All @@ -282,10 +283,10 @@ def _get_plugin_template_data(self) -> TemplateData:
)

def _get_ee_template_data(self) -> TemplateData:
"""Get the template data for lookup plugin.
"""Get the template data for plugin.
Returns:
TemplateData: Data required for templating the lookup plugin.
TemplateData: Data required for templating the plugin.
"""
return TemplateData(
resource_type=self._resource_type,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# GNU General Public License v3.0+

DOCUMENTATION = """
module: hello_world
author: Ansible Core Team
version_added: "1.0.0"
short_description: A custom action plugin for Ansible.
description:
- This is a custom action plugin to provide action functionality.
notes:
- This is a scaffold template. Customize the plugin to fit your needs.
"""

EXAMPLES = """
- name: Example Action Plugin
hosts: localhost
tasks:
- name: Example hello_world plugin
with_prefix:
prefix: "Hello, World"
msg: "Ansible!"
"""

0 comments on commit 6100e07

Please sign in to comment.