Perhaps use the beginning-of-line anchor, e.g. "^[ \t]SSLEngine on[ \t]".
The trailing whitespace can be problematic as well - what if I have a line " SSLEngine on", that is, no whitespace after "on" ?
I see you only updated the regex in one of the playbook tasks in your article. The issue I pointed out apply to all of the tasks, however, and also for "regexp", as well as "insertafter/before" parameters.