Can be fixed by adding --no-tty parametr to shell task: shell: 'gpg --no-tty --batch --keyserver {{ item }} --recv-keys {{ rvm1_gpg_keys }}'