Hello All,

I have a command that has to be automated/written into playbook that 
requires 15-20 random keystrokes.

The scenario is; I am using certutil to generate a key. 

The certutil command when run manually on the shell, asks for few 
keystrokes to fill in a empty space between two vertical bar with 
keystrokes on the cmd. Some thing like |*********|.

How do i automate this using Ansible.

*Play*
- name: Generating CSR
  command: certutil -R -k rsa -g 2048 -n cert -s "CN={{ ref_number }}, 
OU=MyOU, O=MyO, L=MyL, ST=MyST, C=MyC" -d {{ dir_path }} -f {{ pass_file }} 
-a -o {{ ansible_fqdn }}.csr

*Error*
 stderr: |2-

    A random seed must be generated that will be used in the
    creation of your key.  One of the easiest ways to create a
    random seed is to use the timing of keystrokes on a keyboard.

    To begin, type keys on the keyboard until this progress meter
    is full.  DO NOT USE THE AUTOREPEAT FUNCTION ON YOUR KEYBOARD!


    Continue typing until the progress meter is full:

    |                                                            ||

    Finished.  Press enter to continue:
    certutil: unable to generate key(s)
    : PR_END_OF_FILE_ERROR: Encountered end of file
  stderr_lines:
  - ''
  - A random seed must be generated that will be used in the
  - creation of your key.  One of the easiest ways to create a
  - random seed is to use the timing of keystrokes on a keyboard.
  - ''
  - To begin, type keys on the keyboard until this progress meter
  - is full.  DO NOT USE THE AUTOREPEAT FUNCTION ON YOUR KEYBOARD!
  - ''
  - ''
  - 'Continue typing until the progress meter is full:'
  - ''
  - ''
  - '|                                                            |'
  - '|'
  - ''
  - 'Finished.  Press enter to continue: '
  - 'certutil: unable to generate key(s)'
  - ': PR_END_OF_FILE_ERROR: Encountered end of file'



-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/276dceb0-285a-465a-9311-e6fe859a5197%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to