Hi,
is there a solution more user friendly that
http://stackoverflow.com/questions/30786263/only-check-whether-a-line-present-in-a-file-ansible to test if file contain a string?
I don't like that:
- name: Check if bash-completion in enable for root user
command: grep -q "/etc/bash_completion" /root/.bashrc
register: check_bashcompletion_enabled
ignore_errors: True
- name: Enable bach-completion for root user
command: cp /etc/skel/.bashrc /root/.bashrc
when: check_bashcompletion_enabled.rc == 1
Do you know a better solution?
Best regards,
Stéphane