hashicorp/packer-plugin-ansible

ansible-local provisioner doesn't support `ansible_env_vars`

オープン

#50 opened on 2021/06/16

 (1 件のコメント) (4 件のリアクション) (0 人の担当者)Go (39 件のフォーク)auto 404
bugenhancementgood first issuehelp wanted

Repository metrics

Stars
 (64 個のスター)
PR merge metrics
 (PR metrics pending)

説明

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.

コントリビューターガイド