Keyfactor/ansible-ejbca-signserver-playbooks

Ejbca-prep can't find ant

mjourdan opened this issue · 2 comments

Trying to deploy ejbca ce:

$ ansible-playbook -i inventory -l ce01 deployCeNode.yml --ask-vault-pass

The command fails with the following:

TASK [ansible-ejbca-prep : Build clientToolBox] *****************************************************************************************************************************************************************included: /home/mjourdan/git/ansible-ejbca-signserver-playbooks/ansible_ejbca_signsrv/roles/ansible-ejbca-prep/tasks/buildclienttoolbox.yml for ce01

TASK [ansible-ejbca-prep : Check if clientToolBox directory exists] *********************************************************************************************************************************************ok: [ce01]

TASK [ansible-ejbca-prep : Ensure clientToolBox is built] *******************************************************************************************************************************************************fatal: [ce01]: FAILED! => changed=false
  cmd: ant clientToolBox
  msg: '[Errno 2] Aucun fichier ou dossier de ce type: b''ant'': b''ant'''
  rc: 2
  stderr: ''
  stderr_lines: <omitted>
  stdout: ''
  stdout_lines: <omitted>

On the host, the ant command is correctly found in wildfly's environment:

$ ant clientToolBox
Buildfile: build.xml does not exist!
Build failed

This can be solved by replacing the command module with the shell module, and loading the bash_profile before calling ant.

I've never seen this issue happen before. The shell module should not be needed if you have the bash_profile setup for the user that will run wildfly and own EJBCA files.

Close - no update in almost 1 year