1

Here is a snippet of my JSON file for packer. Pretty much running packer build example.json via adhoc - it works smoothly and builds the AMI out in AWS. When i execute this in my GitLabCI Pipeline, it fails with the following error: Errors validating build 'amazon-ebs'. 2 error(s) occurred:

  • playbook_file: config.yml is invalid: stat config.yml: no such file or directory
  • Error running "ansible-playbook --version": exec: "ansible-playbook": executable file not found in $PATH ERROR: Job failed: exit code 1

SNIPPET of the code below (JSON from packer).

provisioners": [{
      "type": "ansible",
      "user": "ubuntu",
      "playbook_file": "config.yml",
      "ansible_env_vars": [ "ANSIBLE_HOST_KEY_CHECKING=False", "ANSIBLE_SSH_ARGS='-o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s'"]
MrWhite
  • 12,647
  • 4
  • 29
  • 41
user509226
  • 11
  • 2
  • 1
    Looks like ansible is not installed in the docker image that Ci is using. Can you post the contents of your `.gitlab-ci.yml`? – Victor Klos Feb 13 '19 at 17:46

0 Answers0