RVM requires username in online prompt during Ruby installation

I am trying to use Ansible to install RVM to install an updated version of Ruby on a remote (RedHat 6.x) system. I tried two separate Ansible-RVM notebooks ( rvm / rvm1-ansible and newmen / ansible-rvm ), but both of them show the same behavior: they both reach the step where the playback program directs the RVM to install Ruby and then stops until I canceled the process:

TASK: [ansible-rvm | installing Ruby as root]
*********************************
<HOST.DOMAIN.xyz>
<HOST.DOMAIN.xyz>
<HOST.DOMAIN.xyz> IdentityFile=/Users/USER/.ssh/private-key-file ConnectTimeout=10 PasswordAuthentication=no KbdInteractiveAuthentication=no ControlPath=/Users/USER/.ansible/cp/ansible-ssh-%h-%p-%r PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey ControlMaster=auto ControlPersist=60s
<HOST.DOMAIN.xyz>
<HOST.DOMAIN.xyz> IdentityFile=/Users/USER/.ssh/private-key-file ConnectTimeout=10 'sudo -k && sudo -H -S -p "[sudo via ansible, key=KEY] password: " -u root /bin/sh -c '"'"'echo SUDO-SUCCESS-KEY; LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python /home/USER/.ansible/tmp/ansible-tmp-dir/command; rm -rf /home/USER/.ansible/tmp/ansible-tmp-dir/ >/dev/null 2>&1'"'"'' PasswordAuthentication=no KbdInteractiveAuthentication=no ControlPath=/Users/USER/.ansible/cp/ansible-ssh-%h-%p-%r PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey ControlMaster=auto ControlPersist=60s
^CERROR: interrupted

It seems that the reason is that the RVM requires some kind of login information. When I use SSH in the host in question to start RVM manually, I get a prompt Username::

$ rvm install ruby-2.2.2
Searching for binary rubies, this might take some time.
No binary rubies available for: redhat/6/x86_64/ruby-2.2.2.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for redhat.
Enabling optional repository
Username: ^C
User interrupted process.

, rvm sudo.

, / RVM, - , , ; , RVM. - ?

+4
1

, rvm , sudo.

rvm1-ansible commit

Ubuntu.

---
- name: Configure servers with ruby support for single user
  hosts: newservers
  become: yes

  roles:
    - { role: rvm_io.ruby,
        tags: ruby,
        rvm1_rubies: [2.3.3],
        rvm1_user: 'sudouser',
        rvm1_install_flags: '--auto-dotfiles --user-install',
        rvm1_install_path: '/home/{{ ansible_user }}/.rvm',
      }

sudo:

ansible-playbook -i hosts.ini ruby_script.yml --user sudouser --ask-sudo-pass
0

All Articles