# moving to ansible

**URL:** <https://forum.ansible.com/t/moving-to-ansible/25982>\
**Category:** Ansible Project\
**Created:** [November 10, 2017, 3:57am UTC](https://forum.ansible.com/t/moving-to-ansible/25982 "2017-11-10T03:57:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![coach.rhca](https://avatars.discourse-cdn.com/v4/letter/c/c57346/32.png) [@coach.rhca](https://forum.ansible.com/u/coach.rhca)\
**Post date:** [November 10, 2017, 3:57am UTC](https://forum.ansible.com/t/moving-to-ansible/25982/1 "2017-11-10T03:57:50Z")

</div>

Hi,

Is there any migration tool which can help in migrating configuration management tool - from cfengine code to ansible playbooks.For example the below snippet code is in cfengine code needs to be moved to ansible.

## cf.ssh files

editfiles:{ /etc/ssh/sshd\_config  
ReplaceAll “.\*AllowTcpForwarding.+[nN][oO]” With “AllowTcpForwarding yes”  
SetCommentStart “#”  
UnCommentLinesContaining “AllowTcpForwarding”  
AppendIfNoSuchLine “Protocol 2”  
HashCommentLinesContaining “Protocol 2,1”  
HashCommentLinesContaining “Protocol 1”  
HashCommentLinesContaining “RhostsAuthentication no”  
AppendIfNoSuchLine “PermitRootLogin no”

AppendIfNoSuchLine “PermitEmptyPasswords no”  
AppendIfNoSuchLine “RhostsRSAAuthentication no”  
AppendIfNoSuchLine “HostbasedAuthentication no”  
#DefineClasses “restartsshd”  
}

shellcommands:

restartsshd.linux::  
“/sbin/service sshd restart”

Could you please suggest as we have many such cf files which needs to be converted to ansible. Any input in this regard is appreciated.thank you.
