Problem with a sh installation

Hello, first i want to say that my english is not good, but i wll to try, i’m new in Ansible too, Y have create my first playbok with instalation of very programas that i need but… here comes the questions.

I want to install my printer with scan i have a script that do that but is not the same.
this script, when proceed to install the program, show a blue screen with a confirmation, only what i have to do is press the enter key

But when i do it whit ansible don’t show me any blue screen with de question and only what the playbook do is thinking

Why???

Here comes my code.

That not Work…


  • hosts: all
    gather_facts: no
    become: True
    become_method: sudo
    become_user: root
    tasks:
    ############## INSTALACION SCANNER #############################

  • name: Descargamos el Tar.gz del Driver del Escaner
    get_url:
    url: https://ftp.hp.com/pub/softlib/software13/printers/SS/SL-C4010ND/uld_V1.00.39_01.17.tar.gz
    dest: /tmp/download-samsungScanner-driver.tar.gz

  • name: Descomprimimos el Archivo Tar
    unarchive:
    src: /tmp/download-samsungScanner-driver.tar.gz
    dest: /tmp/
    remote_src: yes

  • name: Ejecutamos el script de instalacion del scanner
    command: sh /tmp/uld/install-scanner.sh -y

Here comes the script that work’s

#instalacion scanner
wget https://ftp.hp.com/pub/softlib/software13/printers/SS/SL-C4010ND/uld_V1.00.39_01.17.tar.gz
tar zxvf uld_V1.00.39_01.17.tar.gz
cd uld/
sh install-scanner.sh

Thanks a everybody

Do you have the mistake?

the playbook don’t show any error, only what it do is thinking or charging but don’t show nothing that’s the problem :cry:

Can you take a screenshoot?

Here comes the screenshot

i let the playbook around 20 minutes and that do nothing

Tienes que esperar no más, no te queda de otra. Me ha pasado cuando estuve haciendo pruebas. Pero mientras que no salga en rojo no hay problema. Quizá es un archivo muy pesado.

Mi duda está que cuando ejecuto el script se demora un par de segundos eso sí me pide una validación en una pantalla azul que genera, en la cual solo presionó entrer y continúa la instalacion, entonces no sé cómo maneja ansible este tipo de validaciones.

De que se demora en ejecutar, eso es normal, pero tienes que encontrar una manera de que acepte esa validación sin necesidad de presionar enter o poner una clave.

Eso es lo que he buscado todo el día sin encontrar mucho :frowning: por lo mismo decidí publicarlo en el foro para ver si alguien me podía ayudar

Qué es lo que está validando el playbook que presionas enter?

you have to use the shell module instead of command module

Cuando se instala el fix del escaner te pregunta si quieres agregar al usuario a un grupo y te la opcion de aceptar solamente, presionas la tecla y prosigue con la instalación.

This is a English only list, please refrain to use Spanish.

There is a Spanish IRC channel you can use.
https://docs.ansible.com/ansible/latest/community/communication.html

Here are my 3 questions that i have to respons when i want to install my scanner
I find the module Expects but i dont find so much about that, i had tried to implement it, but i get a error.

heres is my code:

here comes the error, i disbloqued the first line of the questions

Actually it's 4, you forgot the --More--, this works

    - expect:
        command: /tmp/uld/install-scanner.sh
        responses:
          "--More--": \r
          to quit: \r
          Do you agree: y
          To skip, enter: n

i tried that but with the same anser

Is correct what i have write?

Please don't use images, it's impossible to comment on.

You need to look closer, I did not have dashes nor Questions in my task.
Just copy inn my task and it will work.

Sorry my friend here comes de code.

  • name: Ejecutamos el script de instalacion del scanner
    expect:
    command: /tmp/uld/install-scanner.sh
    response:
    Questions:
  • “Press Enter to continue or q and then Enter to quit.:” : “\n”
  • “Do you agree ? [y/n]” : “y”
  • “–More–” : “\r”
  • “If you want to configure firewall automatically, enter y or just press Enter. To skip, enter n.” : “n”

I have already given you a working task in a previous mail, so why are you still using this task that doesn't work?