hashicorp/packer-plugin-ansible

ansible-local provisioner doesn't support `ansible_env_vars`

Aberta

#50 aberto em 16 de jun. de 2021

 (1 comentário) (4 reações) (0 responsável)Go (39 forks)auto 404
bugenhancementgood first issuehelp wanted

Métricas do repositório

Stars
 (64 estrelas)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

Overview of the Issue

ansible_env_vars argument for the ansible-local provisioner is not supported

Reproduction Steps

Configure ansible-local provisioner with ansible_env_vars

Plugin and Packer version

Packer v1.7.2

required_plugins {
    amazon = {
      version = "~> 1.0"
      source  = "github.com/hashicorp/amazon"
    }
    ansible = {
      version = ">= 1.0.0"
      source  = "github.com/hashicorp/ansible"
    }
  }

Simplified Packer Buildfile

provisioner "ansible-local" {
    playbook_dir     = abspath("./provisioners/ansible")
    playbook_file    = abspath("./provisioners/ansible/playbook.yml")
    ansible_env_vars = ["ANSIBLE_HOST_KEY_CHECKING=False"]
  }

Operating system and Environment details

macOS big Sur 11.4

Log Fragments and crash.log files

Error: Failed preparing provisioner-block "ansible-local" ""

  on build.pkr.hcl line 27:
  (source code not available)

build.pkr.hcl:31,5-21: Unsupported argument; An argument named
"ansible_env_vars" is not expected here.

Guia do colaborador