I have created an ansible role with name suppose role_A. Now i was asked to follow standard naming convention as per company standard. so is there any way i can rename my role name. Or simply mv command will work for me.
Asked
Active
Viewed 2,280 times
2 Answers
1
You can simply rename it using the command mv role_A new_role_A

Smily
- 2,308
- 2
- 17
- 41
-
I thought the same but never tested this. If that would have been possible then why would people use ansible-galaxy command to create a new role. I mean when we use ansible-galaxy command then it might be storing role name somewhere in config. – manish jha Oct 04 '19 at 11:07
-
ansible-galaxy command is used to install roles from galaxy or GIT. When you create your own role you can just rename it. – Smily Oct 04 '19 at 12:11
0
I also needed to rename the ansible-role but i tackle it by creating another role and moved all files from old role to new role and deleted the old role.

Sagar bobade
- 11