Question: Tried for random numbers by using for loop with count.
I have a field box in that every time it should take random numbers 
example: first I enter 1.8$ and run it will accept this number. 
after I close the browser and re-run the program it should take the value by its own number but not the previous number mainly it should take decimal values which is greater than 1 & ex: 1.1,1.23 like these numbers only it accepts.

Answer: 
you can pass a variable from cli with -e flag, and use that to the `serial` attribute. example (adding a default value of 3 in case you dont pass the variable value in cli):

```
- hosts: ping_test
  serial: "{{ serial_number|default(3) }}"
  gather_facts: true
  vars:

  tasks:
    - name: task 1
      debug:
        var: serial_number

```

run as:

`ansible-playbook <playbook file> -e serial_number=1`

sample output (2 executions):

```
[root@optima-ansible ILIAS]# ansible-playbook -i hosts serial.yml -e serial_number=1

PLAY [ping_test] ****************************************************************************************************************************************************************************************************

TASK [Gathering Facts] **********************************************************************************************************************************************************************************************
ok: [localhost]

TASK [task 1] *******************************************************************************************************************************************************************************************************
ok: [localhost] => {
    "serial_number": "1"
}

PLAY [ping_test] ****************************************************************************************************************************************************************************************************

TASK [Gathering Facts] **********************************************************************************************************************************************************************************************
ok: [greenhat]

TASK [task 1] *******************************************************************************************************************************************************************************************************
ok: [greenhat] => {
    "serial_number": "1"
}

PLAY RECAP **********************************************************************************************************************************************************************************************************
greenhat                   : ok=2    changed=0    unreachable=0    failed=0   
localhost                  : ok=2    changed=0    unreachable=0    failed=0   

[root@optima-ansible ILIAS]# ansible-playbook -i hosts serial.yml -e serial_number=2

PLAY [ping_test] ****************************************************************************************************************************************************************************************************

TASK [Gathering Facts] **********************************************************************************************************************************************************************************************
ok: [greenhat]
ok: [localhost]

TASK [task 1] *******************************************************************************************************************************************************************************************************
ok: [localhost] => {
    "serial_number": "2"
}
ok: [greenhat] => {
    "serial_number": "2"
}

PLAY RECAP **********************************************************************************************************************************************************************************************************
greenhat                   : ok=2    changed=0    unreachable=0    failed=0   
localhost                  : ok=2    changed=0    unreachable=0    failed=0   

[root@optima-ansible ILIAS]# 

```
I ran into this issue today. I always want the playbook to run with `serial: 1`, but I wanted to run a `--check` against all of them to audit for consistency with the playbook. To get around this, just for use with `--check`, I did the following:

```
ansible-playbook -i inventory/hosts <(sed '/serial: 1/d' myserialplaybook.yml) --check

```

There are a few things going on here:

* `<( ... )` is treated as a file with contents of the STDOUT from the command inside
* `sed '/serial: 1/d' file.txt` Drops any line with the string `serial: 1` in it.

Therefore, the resulting playbook file run was simply missing the `serial: 1` line altogether and was able to run the `--check` in full parallel as I needed.