Skip to content

Option to ignore SSH communicator disconnection in provisioning plugins #277

@dlobba

Description

@dlobba

When running an ansible provisioner that triggers reboots the builder communicator stops and cannot reconnect.
As the provisioner is:

  1. local to the Packer host running the builder, and
  2. already aware and perfectly capable of managing disconnections gracefully

This feature request is for Packer to have an option available to the provisioner step to ignore every disconnection occuring during such provisioning step and simply wait for the provisioning command to return (i.e. Ansible for my case).

Use Case(s)

Let ansible handles completely the provisioning step, including machine reboots.

Potential configuration

Availability of a provisioner option to ignore communicator disconnection.

provisioner "ansible" {
    playbook_file = "./playbook.yaml"
    ignore_disconnect = True
  }

Potential References

Attached to this issue I reported a MWE where the communicator disconnection is blocking the entire Packer process.

packer-mwe.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions