When I ssh into a Linux server and run:
$ ansible-playbook -vvvvvv build.yml
it runs fine.
But if I ssh into the Linux server and run:
$ nohup ansible-playbook -vvvvvv build.yml
or
$ ansible-playbook -vvvvvv build.yml > output &
or
$ nohup ansible-playbook -vvvvvv build.yml > nohup.out
or
$ nohup ansible-playbook -vvvvvv build.yml > nohup.out 2>&1 &
it always fails on this task:
- name: wait for something to happen
pause: seconds=15
Like this:
TASK [wait for something to happen] **************************************************
task path: /build.yml:94
Pausing for 15 seconds
(ctrl+C then 'C' = continue early, ctrl+C then 'A' = abort)
An exception occurred during task execution. The full traceback is:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/ansible/executor/task_executor.py", line 120, in run
res = self._execute()
File "/usr/local/lib/python2.7/site-packages/ansible/executor/task_executor.py", line 418, in _execute
result = self._handler.run(task_vars=variables)
File "/usr/local/lib/python2.7/site-packages/ansible/plugins/action/pause.py", line 123, in run
fd = self._connection._new_stdin.fileno()
ValueError: I/O operation on closed file
fatal: [localhost]: FAILED! => {"failed": true, "msg": "Unexpected failure during module execution.", "stdout": ""}
I'm pretty sure it has something to do with STDOUT not being available but I'm not sure of the workaround. Anyone
have a suggestion?
===