# Any tool can convert puppet code to ansible code

**URL:** <https://forum.ansible.com/t/any-tool-can-convert-puppet-code-to-ansible-code/38830>\
**Category:** Ansible Developer\
**Created:** [July 24, 2024, 10:00am UTC](https://forum.ansible.com/t/any-tool-can-convert-puppet-code-to-ansible-code/38830 "2024-07-24T10:00:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pushparaj\_Gothandam](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/pushparaj_gothandam/32/5538_2.png) [@Pushparaj\_Gothandam](https://forum.ansible.com/u/Pushparaj_Gothandam)\
**Post date:** [July 24, 2024, 10:00am UTC](https://forum.ansible.com/t/any-tool-can-convert-puppet-code-to-ansible-code/38830/1 "2024-07-24T10:00:58Z")

</div>

Hi Team,

Any tool available can convert puppet code to ansible code,?

Thanks  
Raj

---

<div class="post-metadata">

**Author:** ![iamroddo](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/iamroddo/32/321_2.png) [@iamroddo](https://forum.ansible.com/u/iamroddo)\
**Post date:** [July 24, 2024, 2:23pm UTC](https://forum.ansible.com/t/any-tool-can-convert-puppet-code-to-ansible-code/38830/2 "2024-07-24T14:23:49Z")

</div>

ChatGPT?

---

<div class="post-metadata">

**Author:** ![Will\_McDonald](https://avatars.discourse-cdn.com/v4/letter/w/f475e1/32.png) [@Will\_McDonald](https://forum.ansible.com/u/Will_McDonald)\
**Post date:** [July 24, 2024, 2:37pm UTC](https://forum.ansible.com/t/any-tool-can-convert-puppet-code-to-ansible-code/38830/3 "2024-07-24T14:37:10Z")

</div>

Not that I’m aware of, most of your Puppet is likely to be package/file/service pattern[1] modules combined with some Hieradata though. So you’re already half way there. You have your desired state already codified. So mapping from Puppet → Ansible then layering in any orchestration (you may have some Puppet Bolt stuff to port, too.)

Hiera data will largely map to host/group vars.  
Puppet modules will largely map to roles.

Wrap in some testing (Inspec/Testinfra/etc.) to ensure the state as generated from Puppet is consistent with the new state generated by Ansible.

[1] [https://www.puppet.com/docs/puppet/8/cheatsheet\_core\_types.html#the\_trifecta](https://www.puppet.com/docs/puppet/8/cheatsheet_core_types.html#the_trifecta)
