Back Up IOS XE Configs to Git with Ansible: Strip the Header Noise, Commit Only Real Changes
ios_config saves a running config in one task. A Git history you can read takes three more: strip the header lines, stage, and commit only when there is a real change. Real runs against six IOS XE devices, including an out-of-band change caught and rolled back.