ansible-galaxy Verified for current stable LTS

Ansible Galaxy Command: Create New Role

An engineer would use the command 'ansible-galaxy role init {{role_name}}' when starting a new automation project to create a structured directory for a specific Ansible role, ensuring organized management of tasks, handlers, and defaults. Exact CLI syntax to create new role using Ansible Galaxy.

When to use this: An engineer would use the command 'ansible-galaxy role init {{role_name}}' when starting a new automation project to create a structured directory for a specific Ansible role, ensuring organized management of tasks, handlers, and defaults.

Command Syntax

ansible-galaxy role init <role_name>

Command Breakdown

ansible-galaxy is the base executable for this command.

FAQ

Purpose: Exact syntax to create new role using Ansible Galaxy.

Test path: Replace placeholders and run destructive commands in a disposable workspace first.

Flag behavior: Tool version, platform, and shell can change behavior.

Improve This Command

Suggest a correction, safer default, or version-specific note for this entry.

Related Operations

Back to Ansible Galaxy directory