problem with 'ansible all -m service -a "name=apache2 state=restarted" '

Sounds like you need to either login as root or use the sudo options.