I need help getting more information on why an import_ playbook fails please…
During a play (play 1) I’m (ansible.builtin.template) sucessfully templating out another play (play 2) and variables file and using trying to call them later in play 1, but that import fails
import_playbook: $LINUX_PLAYBOOKS/paperless/{{play_filename}}
but I get
fatal: [nott]: FAILED! => changed=false
module_stderr: |-
Shared connection to nott.mont closed.
module_stdout: “”
msg: |-
MODULE FAILURE
See stdout/stderr for the exact error
rc: 0
Using debugger: on failed or register and debug var doesn’t give any more useful information
ok: [nott] =>
playoutput:
changed: false
failed: true
module_stderr: |-
Shared connection to nott.mont closed.
module_stdout: “”
msg: |-
MODULE FAILURE
See stdout/stderr for the exact error
rc: 0
Worth noting that the subject of play1 and play2 is, in this case, the server itself, though the play is intended to be used on other machines as well.
Running play2 directly works ok
running play1 with -vvvvv does show a broken pipe in the ssh commands but I can certainly ssh into the server from itself and play1 works successfully up to the point of that import_playbook
debug1: auto-mux: Trying existing master
debug2: fd 3 setting O_NONBLOCK
debug2: mux_client_hello_exchange: master version 4
debug3: mux_client_forwards: request forwardings: 0 local, 0 remote
debug3: mux_client_request_session: entering
debug3: mux_client_request_alive: entering
debug3: mux_client_request_alive: done pid = 72692
debug3: mux_client_request_session: session request sent
debug1: mux_client_request_session: master session id: 2
debug3: mux_client_read_packet: read header failed: Broken pipe
debug2: Received exit status from master 0
Shared connection to nott.mont closed.
module_stdout: “”
msg: |-
MODULE FAILURE
See stdout/stderr for the exact error
rc: 0
…ignoring
This fails even if the previous files exist so I don’t think it’s that - I’ve confirmed so the files exist on disk and it’s the same result whether the play is run either with those files existing, or not.
I’ve tried meta reset connection just before this
Appreciate this may not be the best way to do this but I’m interested to see what’s going on now and what I’m missing.
Scratching my head, apologies if this isn’t clear - finding it hard to explain this one