Team,
I want to write a playbook where we need to check the samba configuration file and if someone has made any changes accidentally it should restore the old config file.
Thanks,
Team,
I want to write a playbook where we need to check the samba configuration file and if someone has made any changes accidentally it should restore the old config file.
Thanks,
Thats the default function of Ansible.
To create this file you have two choices, the copy module[1] or the template module[2].
Copy module just copies a static file out and with template you can have a dynamic file based on facts from the host.
[1] http://docs.ansible.com/ansible/latest/copy_module.html
[2] http://docs.ansible.com/ansible/latest/template_module.html