cloudcastsapp / laravel-aws-ami

AWS AMI's for Laravel
4 stars 2 forks source link

unable to initialize frontend: Dialog #1

Open bassem-shoukry opened 2 years ago

bassem-shoukry commented 2 years ago

Can any one help me to fix this issue please

==> laravel-ubuntu20-x86_64-ami: debconf: unable to initialize frontend: Dialog ==> laravel-ubuntu20-x86_64-ami: debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.) ==> laravel-ubuntu20-x86_64-ami: debconf: falling back to frontend: Readline ==> laravel-ubuntu20-x86_64-ami: debconf: unable to initialize frontend: Readline ==> laravel-ubuntu20-x86_64-ami: debconf: (This frontend requires a controlling tty.) ==> laravel-ubuntu20-x86_64-ami: debconf: falling back to frontend: Teletype ==> laravel-ubuntu20-x86_64-ami: dpkg-preconfigure: unable to re-open stdin

fideloper commented 2 years ago

Hi! Looks like something being installed is prompting for user input, but its setup to run without the ability to give input (since it's automated!).

This project isn't really released yet, I'm still working on it, so I'm not too surprised about hitting issues.

To know what is prompting for a question, we'd probably need more output (what it's attempting to do/install just before you a got that error).

bassem-shoukry commented 2 years ago

this is laravel-aws-ami.json file content

{
    "variables": {
      "aws_profile": "default",
      "aws_region": "eu-central-1"
    },
    "min_packer_version": "1.7.0",
    "builders": [
      {
        "ami_description": "Ubuntu 20.04 x86_64 AMI for Laravel",
        "ami_name": "laravel-ubuntu20-ami-{{isotime | clean_resource_name}}",
        "instance_type": "t2.micro",
        "name": "laravel-ubuntu20-x86_64-ami",
        "profile": "{{user `aws_profile`}}",
        "region": "{{user `aws_region`}}",
        "tags": {
            "Name": "laravel-ubuntu20-x86_64-ami-{{isotime | clean_resource_name}}",
            "Project": "Laravel AMI",
            "ManagedBy": "cloudcasts"
        },
        "source_ami_filter": {
          "filters": {
            "architecture": "x86_64",
            "name": "ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-*",
            "root-device-type": "ebs",
            "virtualization-type": "hvm"
          },
          "most_recent": true,
          "owners": [
            "099720109477"
          ]
        },
        "ssh_username": "ubuntu",
        "type": "amazon-ebs"
      }
    ],
    "provisioners": [
      {
        "type": "shell",
        "script": "scripts/base.sh"
      },
      {
        "type": "ansible-local",
        "playbook_file": "ansible/run.yml",
        "command": "ansible-playbook",
        "role_paths": [
          "ansible/roles/base",
          "ansible/roles/awscli",
          "ansible/roles/certbot",
          "ansible/roles/cloudwatch",
          "ansible/roles/fail2ban",
          "ansible/roles/nginx",
          "ansible/roles/php",
          "ansible/roles/swap"
        ],
        "extra_arguments": ["--extra-vars \"aws_region={{user `aws_region`}}\""],
        "group_vars": "ansible/group_vars"
      }
    ]
  }
fideloper commented 2 years ago

Sorry I meant the actual build output when running Packer, just before the error output you had in the original comment. In other words, the trail of evidence that would lead us to know what step in the process Packer was in.

For example, was this error when running the scripts/base.sh script, or when running some ansible roles?

bassem-shoukry commented 2 years ago

yes i got this after the scripts/base.shrun. build output :

laravel-ubuntu20-x86_64-ami: output will be in this color.
==> laravel-ubuntu20-x86_64-ami: Prevalidating any provided VPC information
==> laravel-ubuntu20-x86_64-ami: Prevalidating AMI Name: laravel-ubuntu20-ami-2022-02-07T14-41-44Z
    laravel-ubuntu20-x86_64-ami: Found Image ID: ami-05b308c240ae70bb6
==> laravel-ubuntu20-x86_64-ami: Creating temporary keypair: packer_62012fa9-4352-f655-a68d-5e4b21f8f659
==> laravel-ubuntu20-x86_64-ami: Creating temporary security group for this instance: packer_62012fac-6c64-a105-b643-3ee92a7b271f
==> laravel-ubuntu20-x86_64-ami: Authorizing access to port 22 from [0.0.0.0/0] in the temporary security groups...
==> laravel-ubuntu20-x86_64-ami: Launching a source AWS instance...
==> laravel-ubuntu20-x86_64-ami: Adding tags to source instance
    laravel-ubuntu20-x86_64-ami: Adding tag: "Name": "Packer Builder"
    laravel-ubuntu20-x86_64-ami: Instance ID: i-05762f84c37785969
==> laravel-ubuntu20-x86_64-ami: Waiting for instance (i-05762f84c37785969) to become ready...
==> laravel-ubuntu20-x86_64-ami: Using SSH communicator to connect: 18.158.59.226
==> laravel-ubuntu20-x86_64-ami: Waiting for SSH to become available...
==> laravel-ubuntu20-x86_64-ami: Connected to SSH!
==> laravel-ubuntu20-x86_64-ami: Provisioning with shell script: scripts/base.sh
    laravel-ubuntu20-x86_64-ami: Hit:1 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal InRelease
    laravel-ubuntu20-x86_64-ami: Get:2 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
    laravel-ubuntu20-x86_64-ami: Get:3 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]
    laravel-ubuntu20-x86_64-ami: Get:4 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
    laravel-ubuntu20-x86_64-ami: Get:5 http://ppa.launchpad.net/ansible/ansible/ubuntu focal InRelease [18.0 kB]
    laravel-ubuntu20-x86_64-ami: Get:6 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal/universe amd64 Packages [8628 kB]
    laravel-ubuntu20-x86_64-ami: Get:7 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal/universe Translation-en [5124 kB]
    laravel-ubuntu20-x86_64-ami: Get:8 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal/universe amd64 c-n-f Metadata [265 kB]
    laravel-ubuntu20-x86_64-ami: Get:9 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal/multiverse amd64 Packages [144 kB]
    laravel-ubuntu20-x86_64-ami: Get:10 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal/multiverse Translation-en [104 kB]
    laravel-ubuntu20-x86_64-ami: Get:11 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal/multiverse amd64 c-n-f Metadata [9136 B]
    laravel-ubuntu20-x86_64-ami: Get:12 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [1555 kB]
    laravel-ubuntu20-x86_64-ami: Get:13 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal-updates/main Translation-en [300 kB]
    laravel-ubuntu20-x86_64-ami: Get:14 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal-updates/main amd64 c-n-f Metadata [14.7 kB]
    laravel-ubuntu20-x86_64-ami: Get:15 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [794 kB]
    laravel-ubuntu20-x86_64-ami: Get:16 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal-updates/restricted Translation-en [113 kB]
    laravel-ubuntu20-x86_64-ami: Get:17 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 c-n-f Metadata [500 B]
    laravel-ubuntu20-x86_64-ami: Get:18 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [896 kB]
    laravel-ubuntu20-x86_64-ami: Get:19 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal-updates/universe Translation-en [197 kB]
    laravel-ubuntu20-x86_64-ami: Get:20 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal-updates/universe amd64 c-n-f Metadata [20.0 kB]
    laravel-ubuntu20-x86_64-ami: Get:21 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 Packages [23.8 kB]
    laravel-ubuntu20-x86_64-ami: Get:22 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal-updates/multiverse Translation-en [7312 B]
    laravel-ubuntu20-x86_64-ami: Get:23 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 c-n-f Metadata [580 B]
    laravel-ubuntu20-x86_64-ami: Get:24 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal-backports/main amd64 Packages [42.0 kB]
    laravel-ubuntu20-x86_64-ami: Get:25 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal-backports/main Translation-en [10.0 kB]
    laravel-ubuntu20-x86_64-ami: Get:26 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal-backports/main amd64 c-n-f Metadata [864 B]
    laravel-ubuntu20-x86_64-ami: Get:27 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal-backports/restricted amd64 c-n-f Metadata [116 B]
    laravel-ubuntu20-x86_64-ami: Get:28 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal-backports/universe amd64 Packages [20.8 kB]
    laravel-ubuntu20-x86_64-ami: Get:29 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal-backports/universe Translation-en [14.3 kB]
    laravel-ubuntu20-x86_64-ami: Get:30 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal-backports/universe amd64 c-n-f Metadata [692 B]
    laravel-ubuntu20-x86_64-ami: Get:31 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal-backports/multiverse amd64 c-n-f Metadata [116 B]
    laravel-ubuntu20-x86_64-ami: Get:32 http://ppa.launchpad.net/ansible/ansible/ubuntu focal/main amd64 Packages [1128 B]
    laravel-ubuntu20-x86_64-ami: Get:33 http://ppa.launchpad.net/ansible/ansible/ubuntu focal/main Translation-en [756 B]
    laravel-ubuntu20-x86_64-ami: Get:34 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [1214 kB]
    laravel-ubuntu20-x86_64-ami: Get:35 http://security.ubuntu.com/ubuntu focal-security/main Translation-en [214 kB]
    laravel-ubuntu20-x86_64-ami: Get:36 http://security.ubuntu.com/ubuntu focal-security/main amd64 c-n-f Metadata [9136 B]
    laravel-ubuntu20-x86_64-ami: Get:37 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 Packages [737 kB]
    laravel-ubuntu20-x86_64-ami: Get:38 http://security.ubuntu.com/ubuntu focal-security/restricted Translation-en [105 kB]
    laravel-ubuntu20-x86_64-ami: Get:39 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 c-n-f Metadata [504 B]
    laravel-ubuntu20-x86_64-ami: Get:40 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages [676 kB]
    laravel-ubuntu20-x86_64-ami: Get:41 http://security.ubuntu.com/ubuntu focal-security/universe Translation-en [115 kB]
    laravel-ubuntu20-x86_64-ami: Get:42 http://security.ubuntu.com/ubuntu focal-security/universe amd64 c-n-f Metadata [13.0 kB]
    laravel-ubuntu20-x86_64-ami: Get:43 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 Packages [20.7 kB]
    laravel-ubuntu20-x86_64-ami: Get:44 http://security.ubuntu.com/ubuntu focal-security/multiverse Translation-en [5196 B]
    laravel-ubuntu20-x86_64-ami: Get:45 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 c-n-f Metadata [500 B]
    laravel-ubuntu20-x86_64-ami: Fetched 21.8 MB in 4s (5517 kB/s)
    laravel-ubuntu20-x86_64-ami: Reading package lists...
    laravel-ubuntu20-x86_64-ami: Hit:1 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal InRelease
    laravel-ubuntu20-x86_64-ami: Hit:2 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal-updates InRelease
    laravel-ubuntu20-x86_64-ami: Hit:3 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal-backports InRelease
    laravel-ubuntu20-x86_64-ami: Hit:4 http://ppa.launchpad.net/ansible/ansible/ubuntu focal InRelease
    laravel-ubuntu20-x86_64-ami: Hit:5 http://security.ubuntu.com/ubuntu focal-security InRelease
    laravel-ubuntu20-x86_64-ami: Reading package lists...
    laravel-ubuntu20-x86_64-ami: Reading package lists...
    laravel-ubuntu20-x86_64-ami: Building dependency tree...
    laravel-ubuntu20-x86_64-ami: Reading state information...
    laravel-ubuntu20-x86_64-ami: The following additional packages will be installed:
    laravel-ubuntu20-x86_64-ami:   ansible-core python3-bcrypt python3-jmespath python3-kerberos
    laravel-ubuntu20-x86_64-ami:   python3-ntlm-auth python3-packaging python3-paramiko python3-pyparsing
    laravel-ubuntu20-x86_64-ami:   python3-requests-kerberos python3-requests-ntlm python3-resolvelib
    laravel-ubuntu20-x86_64-ami:   python3-winrm python3-xmltodict sshpass
    laravel-ubuntu20-x86_64-ami: Suggested packages:
    laravel-ubuntu20-x86_64-ami:   python3-gssapi python-pyparsing-doc
    laravel-ubuntu20-x86_64-ami: The following NEW packages will be installed:
    laravel-ubuntu20-x86_64-ami:   ansible ansible-core python3-bcrypt python3-jmespath python3-kerberos
    laravel-ubuntu20-x86_64-ami:   python3-ntlm-auth python3-packaging python3-paramiko python3-pyparsing
    laravel-ubuntu20-x86_64-ami:   python3-requests-kerberos python3-requests-ntlm python3-resolvelib
    laravel-ubuntu20-x86_64-ami:   python3-winrm python3-xmltodict sshpass
    laravel-ubuntu20-x86_64-ami: 0 upgraded, 15 newly installed, 0 to remove and 9 not upgraded.
    laravel-ubuntu20-x86_64-ami: Need to get 23.0 MB of archives.
    laravel-ubuntu20-x86_64-ami: After this operation, 301 MB of additional disk space will be used.
    laravel-ubuntu20-x86_64-ami: Get:1 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal/main amd64 python3-pyparsing all 2.4.6-1 [61.3 kB]
    laravel-ubuntu20-x86_64-ami: Get:2 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal/main amd64 python3-packaging all 20.3-1 [26.8 kB]
    laravel-ubuntu20-x86_64-ami: Get:3 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal-updates/main amd64 python3-jmespath all 0.9.4-2ubuntu1 [21.5 kB]
    laravel-ubuntu20-x86_64-ami: Get:4 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal/universe amd64 python3-kerberos amd64 1.1.14-3.1build1 [22.6 kB]
    laravel-ubuntu20-x86_64-ami: Get:5 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal/universe amd64 python3-ntlm-auth all 1.1.0-1 [19.6 kB]
    laravel-ubuntu20-x86_64-ami: Get:6 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal/main amd64 python3-bcrypt amd64 3.1.7-2ubuntu1 [30.4 kB]
    laravel-ubuntu20-x86_64-ami: Get:7 http://ppa.launchpad.net/ansible/ansible/ubuntu focal/main amd64 python3-resolvelib all 0.5.4-2ppa~focal [12.6 kB]
    laravel-ubuntu20-x86_64-ami: Get:8 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal/main amd64 python3-paramiko all 2.6.0-2 [122 kB]
    laravel-ubuntu20-x86_64-ami: Get:9 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal/universe amd64 python3-requests-kerberos all 0.12.0-2 [11.9 kB]
    laravel-ubuntu20-x86_64-ami: Get:10 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal/universe amd64 python3-requests-ntlm all 1.1.0-1 [6004 B]
    laravel-ubuntu20-x86_64-ami: Get:11 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal/universe amd64 python3-xmltodict all 0.12.0-1 [12.6 kB]
    laravel-ubuntu20-x86_64-ami: Get:12 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal/universe amd64 python3-winrm all 0.3.0-2 [21.7 kB]
    laravel-ubuntu20-x86_64-ami: Get:13 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal/universe amd64 sshpass amd64 1.06-1 [10.5 kB]
    laravel-ubuntu20-x86_64-ami: Get:14 http://ppa.launchpad.net/ansible/ansible/ubuntu focal/main amd64 ansible-core all 2.12.2-1ppa~focal [941 kB]
    laravel-ubuntu20-x86_64-ami: Get:15 http://ppa.launchpad.net/ansible/ansible/ubuntu focal/main amd64 ansible all 5.3.0-1ppa~focal [21.7 MB]
==> laravel-ubuntu20-x86_64-ami: debconf: unable to initialize frontend: Dialog
==> laravel-ubuntu20-x86_64-ami: debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.)
==> laravel-ubuntu20-x86_64-ami: debconf: falling back to frontend: Readline
==> laravel-ubuntu20-x86_64-ami: debconf: unable to initialize frontend: Readline
==> laravel-ubuntu20-x86_64-ami: debconf: (This frontend requires a controlling tty.)
==> laravel-ubuntu20-x86_64-ami: debconf: falling back to frontend: Teletype
==> laravel-ubuntu20-x86_64-ami: dpkg-preconfigure: unable to re-open stdin
fideloper commented 2 years ago

Thanks!

Did you customize the base.sh script? It looks like it installs ansible but then is doing another operation after that (however I could be wrong - let me know!)

bassem-shoukry commented 2 years ago

this my file content

#! /usr/bin/env bash

set -e

export DEBIAN_FRONTEND="noninteractive"

sudo add-apt-repository -y ppa:ansible/ansible
sudo apt-get update
sudo apt-get install -y ansible --allow-unauthenticated
fideloper commented 2 years ago

Gotcha

This does actually halt execution and fail, right?

I've seen those errors/red output before but its generally ignorable. I've assumed this stops the packer build from completing here, but let me know if not. If it doesn't stop it from continuing, that's actually okay and often expected with how Debian and the use of export DEBIAN_FRONTEND="noninteractive" works.

Let me know!

bassem-shoukry commented 2 years ago

this is the full output

laravel-ubuntu20-x86_64-ami: output will be in this color.

==> laravel-ubuntu20-x86_64-ami: Prevalidating any provided VPC information
==> laravel-ubuntu20-x86_64-ami: Prevalidating AMI Name: laravel-ubuntu20-ami-2022-02-07T14-41-44Z
    laravel-ubuntu20-x86_64-ami: Found Image ID: ami-05b308c240ae70bb6
==> laravel-ubuntu20-x86_64-ami: Creating temporary keypair: packer_62012fa9-4352-f655-a68d-5e4b21f8f659
==> laravel-ubuntu20-x86_64-ami: Creating temporary security group for this instance: packer_62012fac-6c64-a105-b643-3ee92a7b271f
==> laravel-ubuntu20-x86_64-ami: Authorizing access to port 22 from [0.0.0.0/0] in the temporary security groups...
==> laravel-ubuntu20-x86_64-ami: Launching a source AWS instance...
==> laravel-ubuntu20-x86_64-ami: Adding tags to source instance
    laravel-ubuntu20-x86_64-ami: Adding tag: "Name": "Packer Builder"
    laravel-ubuntu20-x86_64-ami: Instance ID: i-05762f84c37785969
==> laravel-ubuntu20-x86_64-ami: Waiting for instance (i-05762f84c37785969) to become ready...
==> laravel-ubuntu20-x86_64-ami: Using SSH communicator to connect: 18.158.59.226
==> laravel-ubuntu20-x86_64-ami: Waiting for SSH to become available...
==> laravel-ubuntu20-x86_64-ami: Connected to SSH!
==> laravel-ubuntu20-x86_64-ami: Provisioning with shell script: scripts/base.sh
    laravel-ubuntu20-x86_64-ami: Hit:1 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal InRelease
    laravel-ubuntu20-x86_64-ami: Get:2 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
    laravel-ubuntu20-x86_64-ami: Get:3 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]
    laravel-ubuntu20-x86_64-ami: Get:4 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
    laravel-ubuntu20-x86_64-ami: Get:5 http://ppa.launchpad.net/ansible/ansible/ubuntu focal InRelease [18.0 kB]
    laravel-ubuntu20-x86_64-ami: Get:6 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal/universe amd64 Packages [8628 kB]
    laravel-ubuntu20-x86_64-ami: Get:7 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal/universe Translation-en [5124 kB]
    laravel-ubuntu20-x86_64-ami: Get:8 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal/universe amd64 c-n-f Metadata [265 kB]
    laravel-ubuntu20-x86_64-ami: Get:9 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal/multiverse amd64 Packages [144 kB]
    laravel-ubuntu20-x86_64-ami: Get:10 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal/multiverse Translation-en [104 kB]
    laravel-ubuntu20-x86_64-ami: Get:11 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal/multiverse amd64 c-n-f Metadata [9136 B]
    laravel-ubuntu20-x86_64-ami: Get:12 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [1555 kB]
    laravel-ubuntu20-x86_64-ami: Get:13 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal-updates/main Translation-en [300 kB]
    laravel-ubuntu20-x86_64-ami: Get:14 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal-updates/main amd64 c-n-f Metadata [14.7 kB]
    laravel-ubuntu20-x86_64-ami: Get:15 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [794 kB]
    laravel-ubuntu20-x86_64-ami: Get:16 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal-updates/restricted Translation-en [113 kB]
    laravel-ubuntu20-x86_64-ami: Get:17 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 c-n-f Metadata [500 B]
    laravel-ubuntu20-x86_64-ami: Get:18 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [896 kB]
    laravel-ubuntu20-x86_64-ami: Get:19 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal-updates/universe Translation-en [197 kB]
    laravel-ubuntu20-x86_64-ami: Get:20 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal-updates/universe amd64 c-n-f Metadata [20.0 kB]
    laravel-ubuntu20-x86_64-ami: Get:21 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 Packages [23.8 kB]
    laravel-ubuntu20-x86_64-ami: Get:22 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal-updates/multiverse Translation-en [7312 B]
    laravel-ubuntu20-x86_64-ami: Get:23 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 c-n-f Metadata [580 B]
    laravel-ubuntu20-x86_64-ami: Get:24 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal-backports/main amd64 Packages [42.0 kB]
    laravel-ubuntu20-x86_64-ami: Get:25 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal-backports/main Translation-en [10.0 kB]
    laravel-ubuntu20-x86_64-ami: Get:26 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal-backports/main amd64 c-n-f Metadata [864 B]
    laravel-ubuntu20-x86_64-ami: Get:27 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal-backports/restricted amd64 c-n-f Metadata [116 B]
    laravel-ubuntu20-x86_64-ami: Get:28 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal-backports/universe amd64 Packages [20.8 kB]
    laravel-ubuntu20-x86_64-ami: Get:29 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal-backports/universe Translation-en [14.3 kB]
    laravel-ubuntu20-x86_64-ami: Get:30 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal-backports/universe amd64 c-n-f Metadata [692 B]
    laravel-ubuntu20-x86_64-ami: Get:31 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal-backports/multiverse amd64 c-n-f Metadata [116 B]
    laravel-ubuntu20-x86_64-ami: Get:32 http://ppa.launchpad.net/ansible/ansible/ubuntu focal/main amd64 Packages [1128 B]
    laravel-ubuntu20-x86_64-ami: Get:33 http://ppa.launchpad.net/ansible/ansible/ubuntu focal/main Translation-en [756 B]
    laravel-ubuntu20-x86_64-ami: Get:34 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [1214 kB]
    laravel-ubuntu20-x86_64-ami: Get:35 http://security.ubuntu.com/ubuntu focal-security/main Translation-en [214 kB]
    laravel-ubuntu20-x86_64-ami: Get:36 http://security.ubuntu.com/ubuntu focal-security/main amd64 c-n-f Metadata [9136 B]
    laravel-ubuntu20-x86_64-ami: Get:37 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 Packages [737 kB]
    laravel-ubuntu20-x86_64-ami: Get:38 http://security.ubuntu.com/ubuntu focal-security/restricted Translation-en [105 kB]
    laravel-ubuntu20-x86_64-ami: Get:39 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 c-n-f Metadata [504 B]
    laravel-ubuntu20-x86_64-ami: Get:40 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages [676 kB]
    laravel-ubuntu20-x86_64-ami: Get:41 http://security.ubuntu.com/ubuntu focal-security/universe Translation-en [115 kB]
    laravel-ubuntu20-x86_64-ami: Get:42 http://security.ubuntu.com/ubuntu focal-security/universe amd64 c-n-f Metadata [13.0 kB]
    laravel-ubuntu20-x86_64-ami: Get:43 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 Packages [20.7 kB]
    laravel-ubuntu20-x86_64-ami: Get:44 http://security.ubuntu.com/ubuntu focal-security/multiverse Translation-en [5196 B]
    laravel-ubuntu20-x86_64-ami: Get:45 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 c-n-f Metadata [500 B]
    laravel-ubuntu20-x86_64-ami: Fetched 21.8 MB in 4s (5517 kB/s)
    laravel-ubuntu20-x86_64-ami: Reading package lists...
    laravel-ubuntu20-x86_64-ami: Hit:1 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal InRelease
    laravel-ubuntu20-x86_64-ami: Hit:2 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal-updates InRelease
    laravel-ubuntu20-x86_64-ami: Hit:3 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal-backports InRelease
    laravel-ubuntu20-x86_64-ami: Hit:4 http://ppa.launchpad.net/ansible/ansible/ubuntu focal InRelease
    laravel-ubuntu20-x86_64-ami: Hit:5 http://security.ubuntu.com/ubuntu focal-security InRelease
    laravel-ubuntu20-x86_64-ami: Reading package lists...
    laravel-ubuntu20-x86_64-ami: Reading package lists...
    laravel-ubuntu20-x86_64-ami: Building dependency tree...
    laravel-ubuntu20-x86_64-ami: Reading state information...
    laravel-ubuntu20-x86_64-ami: The following additional packages will be installed:
    laravel-ubuntu20-x86_64-ami:   ansible-core python3-bcrypt python3-jmespath python3-kerberos
    laravel-ubuntu20-x86_64-ami:   python3-ntlm-auth python3-packaging python3-paramiko python3-pyparsing
    laravel-ubuntu20-x86_64-ami:   python3-requests-kerberos python3-requests-ntlm python3-resolvelib
    laravel-ubuntu20-x86_64-ami:   python3-winrm python3-xmltodict sshpass
    laravel-ubuntu20-x86_64-ami: Suggested packages:
    laravel-ubuntu20-x86_64-ami:   python3-gssapi python-pyparsing-doc
    laravel-ubuntu20-x86_64-ami: The following NEW packages will be installed:
    laravel-ubuntu20-x86_64-ami:   ansible ansible-core python3-bcrypt python3-jmespath python3-kerberos
    laravel-ubuntu20-x86_64-ami:   python3-ntlm-auth python3-packaging python3-paramiko python3-pyparsing
    laravel-ubuntu20-x86_64-ami:   python3-requests-kerberos python3-requests-ntlm python3-resolvelib
    laravel-ubuntu20-x86_64-ami:   python3-winrm python3-xmltodict sshpass
    laravel-ubuntu20-x86_64-ami: 0 upgraded, 15 newly installed, 0 to remove and 9 not upgraded.
    laravel-ubuntu20-x86_64-ami: Need to get 23.0 MB of archives.
    laravel-ubuntu20-x86_64-ami: After this operation, 301 MB of additional disk space will be used.
    laravel-ubuntu20-x86_64-ami: Get:1 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal/main amd64 python3-pyparsing all 2.4.6-1 [61.3 kB]
    laravel-ubuntu20-x86_64-ami: Get:2 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal/main amd64 python3-packaging all 20.3-1 [26.8 kB]
    laravel-ubuntu20-x86_64-ami: Get:3 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal-updates/main amd64 python3-jmespath all 0.9.4-2ubuntu1 [21.5 kB]
    laravel-ubuntu20-x86_64-ami: Get:4 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal/universe amd64 python3-kerberos amd64 1.1.14-3.1build1 [22.6 kB]
    laravel-ubuntu20-x86_64-ami: Get:5 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal/universe amd64 python3-ntlm-auth all 1.1.0-1 [19.6 kB]
    laravel-ubuntu20-x86_64-ami: Get:6 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal/main amd64 python3-bcrypt amd64 3.1.7-2ubuntu1 [30.4 kB]
    laravel-ubuntu20-x86_64-ami: Get:7 http://ppa.launchpad.net/ansible/ansible/ubuntu focal/main amd64 python3-resolvelib all 0.5.4-2ppa~focal [12.6 kB]
    laravel-ubuntu20-x86_64-ami: Get:8 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal/main amd64 python3-paramiko all 2.6.0-2 [122 kB]
    laravel-ubuntu20-x86_64-ami: Get:9 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal/universe amd64 python3-requests-kerberos all 0.12.0-2 [11.9 kB]
    laravel-ubuntu20-x86_64-ami: Get:10 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal/universe amd64 python3-requests-ntlm all 1.1.0-1 [6004 B]
    laravel-ubuntu20-x86_64-ami: Get:11 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal/universe amd64 python3-xmltodict all 0.12.0-1 [12.6 kB]
    laravel-ubuntu20-x86_64-ami: Get:12 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal/universe amd64 python3-winrm all 0.3.0-2 [21.7 kB]
    laravel-ubuntu20-x86_64-ami: Get:13 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu focal/universe amd64 sshpass amd64 1.06-1 [10.5 kB]
    laravel-ubuntu20-x86_64-ami: Get:14 http://ppa.launchpad.net/ansible/ansible/ubuntu focal/main amd64 ansible-core all 2.12.2-1ppa~focal [941 kB]
    laravel-ubuntu20-x86_64-ami: Get:15 http://ppa.launchpad.net/ansible/ansible/ubuntu focal/main amd64 ansible all 5.3.0-1ppa~focal [21.7 MB]
==> laravel-ubuntu20-x86_64-ami: debconf: unable to initialize frontend: Dialog
==> laravel-ubuntu20-x86_64-ami: debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.)
==> laravel-ubuntu20-x86_64-ami: debconf: falling back to frontend: Readline
==> laravel-ubuntu20-x86_64-ami: debconf: unable to initialize frontend: Readline
==> laravel-ubuntu20-x86_64-ami: debconf: (This frontend requires a controlling tty.)
==> laravel-ubuntu20-x86_64-ami: debconf: falling back to frontend: Teletype
==> laravel-ubuntu20-x86_64-ami: dpkg-preconfigure: unable to re-open stdin:
    laravel-ubuntu20-x86_64-ami: Fetched 23.0 MB in 1s (20.7 MB/s)
    laravel-ubuntu20-x86_64-ami: Selecting previously unselected package python3-pyparsing.
    laravel-ubuntu20-x86_64-ami: (Reading database ... 63899 files and directories currently installed.)
    laravel-ubuntu20-x86_64-ami: Preparing to unpack .../00-python3-pyparsing_2.4.6-1_all.deb ...
    laravel-ubuntu20-x86_64-ami: Unpacking python3-pyparsing (2.4.6-1) ...
    laravel-ubuntu20-x86_64-ami: Selecting previously unselected package python3-packaging.
    laravel-ubuntu20-x86_64-ami: Preparing to unpack .../01-python3-packaging_20.3-1_all.deb ...
    laravel-ubuntu20-x86_64-ami: Unpacking python3-packaging (20.3-1) ...
    laravel-ubuntu20-x86_64-ami: Selecting previously unselected package python3-resolvelib.
    laravel-ubuntu20-x86_64-ami: Preparing to unpack .../02-python3-resolvelib_0.5.4-2ppa~focal_all.deb ...
    laravel-ubuntu20-x86_64-ami: Unpacking python3-resolvelib (0.5.4-2ppa~focal) ...
    laravel-ubuntu20-x86_64-ami: Selecting previously unselected package ansible-core.
    laravel-ubuntu20-x86_64-ami: Preparing to unpack .../03-ansible-core_2.12.2-1ppa~focal_all.deb ...
    laravel-ubuntu20-x86_64-ami: Unpacking ansible-core (2.12.2-1ppa~focal) ...
    laravel-ubuntu20-x86_64-ami: Selecting previously unselected package ansible.
    laravel-ubuntu20-x86_64-ami: Preparing to unpack .../04-ansible_5.3.0-1ppa~focal_all.deb ...
    laravel-ubuntu20-x86_64-ami: Unpacking ansible (5.3.0-1ppa~focal) ...
    laravel-ubuntu20-x86_64-ami: Selecting previously unselected package python3-jmespath.
    laravel-ubuntu20-x86_64-ami: Preparing to unpack .../05-python3-jmespath_0.9.4-2ubuntu1_all.deb ...
    laravel-ubuntu20-x86_64-ami: Unpacking python3-jmespath (0.9.4-2ubuntu1) ...
    laravel-ubuntu20-x86_64-ami: Selecting previously unselected package python3-kerberos.
    laravel-ubuntu20-x86_64-ami: Preparing to unpack .../06-python3-kerberos_1.1.14-3.1build1_amd64.deb ...
    laravel-ubuntu20-x86_64-ami: Unpacking python3-kerberos (1.1.14-3.1build1) ...
    laravel-ubuntu20-x86_64-ami: Selecting previously unselected package python3-ntlm-auth.
    laravel-ubuntu20-x86_64-ami: Preparing to unpack .../07-python3-ntlm-auth_1.1.0-1_all.deb ...
    laravel-ubuntu20-x86_64-ami: Unpacking python3-ntlm-auth (1.1.0-1) ...
    laravel-ubuntu20-x86_64-ami: Selecting previously unselected package python3-bcrypt.
    laravel-ubuntu20-x86_64-ami: Preparing to unpack .../08-python3-bcrypt_3.1.7-2ubuntu1_amd64.deb ...
    laravel-ubuntu20-x86_64-ami: Unpacking python3-bcrypt (3.1.7-2ubuntu1) ...
    laravel-ubuntu20-x86_64-ami: Selecting previously unselected package python3-paramiko.
    laravel-ubuntu20-x86_64-ami: Preparing to unpack .../09-python3-paramiko_2.6.0-2_all.deb ...
    laravel-ubuntu20-x86_64-ami: Unpacking python3-paramiko (2.6.0-2) ...
    laravel-ubuntu20-x86_64-ami: Selecting previously unselected package python3-requests-kerberos.
    laravel-ubuntu20-x86_64-ami: Preparing to unpack .../10-python3-requests-kerberos_0.12.0-2_all.deb ...
    laravel-ubuntu20-x86_64-ami: Unpacking python3-requests-kerberos (0.12.0-2) ...
    laravel-ubuntu20-x86_64-ami: Selecting previously unselected package python3-requests-ntlm.
    laravel-ubuntu20-x86_64-ami: Preparing to unpack .../11-python3-requests-ntlm_1.1.0-1_all.deb ...
    laravel-ubuntu20-x86_64-ami: Unpacking python3-requests-ntlm (1.1.0-1) ...
    laravel-ubuntu20-x86_64-ami: Selecting previously unselected package python3-xmltodict.
    laravel-ubuntu20-x86_64-ami: Preparing to unpack .../12-python3-xmltodict_0.12.0-1_all.deb ...
    laravel-ubuntu20-x86_64-ami: Unpacking python3-xmltodict (0.12.0-1) ...
    laravel-ubuntu20-x86_64-ami: Selecting previously unselected package python3-winrm.
    laravel-ubuntu20-x86_64-ami: Preparing to unpack .../13-python3-winrm_0.3.0-2_all.deb ...
    laravel-ubuntu20-x86_64-ami: Unpacking python3-winrm (0.3.0-2) ...
    laravel-ubuntu20-x86_64-ami: Selecting previously unselected package sshpass.
    laravel-ubuntu20-x86_64-ami: Preparing to unpack .../14-sshpass_1.06-1_amd64.deb ...
    laravel-ubuntu20-x86_64-ami: Unpacking sshpass (1.06-1) ...
    laravel-ubuntu20-x86_64-ami: Setting up python3-ntlm-auth (1.1.0-1) ...
    laravel-ubuntu20-x86_64-ami: Setting up python3-bcrypt (3.1.7-2ubuntu1) ...
    laravel-ubuntu20-x86_64-ami: Setting up python3-resolvelib (0.5.4-2ppa~focal) ...
    laravel-ubuntu20-x86_64-ami: Setting up python3-kerberos (1.1.14-3.1build1) ...
    laravel-ubuntu20-x86_64-ami: Setting up sshpass (1.06-1) ...
    laravel-ubuntu20-x86_64-ami: Setting up python3-xmltodict (0.12.0-1) ...
    laravel-ubuntu20-x86_64-ami: Setting up python3-pyparsing (2.4.6-1) ...
    laravel-ubuntu20-x86_64-ami: Setting up python3-jmespath (0.9.4-2ubuntu1) ...
    laravel-ubuntu20-x86_64-ami: Setting up python3-requests-kerberos (0.12.0-2) ...
    laravel-ubuntu20-x86_64-ami: Setting up python3-paramiko (2.6.0-2) ...
    laravel-ubuntu20-x86_64-ami: Setting up python3-requests-ntlm (1.1.0-1) ...
    laravel-ubuntu20-x86_64-ami: Setting up python3-packaging (20.3-1) ...
    laravel-ubuntu20-x86_64-ami: Setting up python3-winrm (0.3.0-2) ...
    laravel-ubuntu20-x86_64-ami: Setting up ansible-core (2.12.2-1ppa~focal) ...
    laravel-ubuntu20-x86_64-ami: Setting up ansible (5.3.0-1ppa~focal) ...
    laravel-ubuntu20-x86_64-ami: Processing triggers for man-db (2.9.1-1) ...
==> laravel-ubuntu20-x86_64-ami: Provisioning with Ansible...
    laravel-ubuntu20-x86_64-ami: Creating Ansible staging directory...
    laravel-ubuntu20-x86_64-ami: Creating directory: /tmp/packer-provisioner-ansible-local/62012fa9-85b5-8db7-2e21-eb20e5df8c4a
    laravel-ubuntu20-x86_64-ami: Uploading main Playbook file...
    laravel-ubuntu20-x86_64-ami: Uploading inventory file...
    laravel-ubuntu20-x86_64-ami: Uploading group_vars directory...
    laravel-ubuntu20-x86_64-ami: Creating directory: /tmp/packer-provisioner-ansible-local/62012fa9-85b5-8db7-2e21-eb20e5df8c4a/group_vars
    laravel-ubuntu20-x86_64-ami: Uploading role directories...
    laravel-ubuntu20-x86_64-ami: Creating directory: /tmp/packer-provisioner-ansible-local/62012fa9-85b5-8db7-2e21-eb20e5df8c4a/roles/base
    laravel-ubuntu20-x86_64-ami: Creating directory: /tmp/packer-provisioner-ansible-local/62012fa9-85b5-8db7-2e21-eb20e5df8c4a/roles/awscli
    laravel-ubuntu20-x86_64-ami: Creating directory: /tmp/packer-provisioner-ansible-local/62012fa9-85b5-8db7-2e21-eb20e5df8c4a/roles/certbot
    laravel-ubuntu20-x86_64-ami: Creating directory: /tmp/packer-provisioner-ansible-local/62012fa9-85b5-8db7-2e21-eb20e5df8c4a/roles/cloudwatch
    laravel-ubuntu20-x86_64-ami: Creating directory: /tmp/packer-provisioner-ansible-local/62012fa9-85b5-8db7-2e21-eb20e5df8c4a/roles/fail2ban
    laravel-ubuntu20-x86_64-ami: Creating directory: /tmp/packer-provisioner-ansible-local/62012fa9-85b5-8db7-2e21-eb20e5df8c4a/roles/nginx
    laravel-ubuntu20-x86_64-ami: Creating directory: /tmp/packer-provisioner-ansible-local/62012fa9-85b5-8db7-2e21-eb20e5df8c4a/roles/php
    laravel-ubuntu20-x86_64-ami: Creating directory: /tmp/packer-provisioner-ansible-local/62012fa9-85b5-8db7-2e21-eb20e5df8c4a/roles/swap
    laravel-ubuntu20-x86_64-ami: Executing Ansible: cd /tmp/packer-provisioner-ansible-local/62012fa9-85b5-8db7-2e21-eb20e5df8c4a && ansible-playbook /tmp/packer-provisioner-ansible-local/62012fa9-85b5-8db7-2e21-eb20e5df8c4a/run.yml --extra-vars "packer_build_name=laravel-ubuntu20-x86_64-ami packer_builder_type=amazon-ebs packer_http_addr=ERR_HTTP_ADDR_NOT_IMPLEMENTED_BY_BUILDER -o IdentitiesOnly=yes" --extra-vars "aws_region=eu-central-1" -c local -i /tmp/packer-provisioner-ansible-local/62012fa9-85b5-8db7-2e21-eb20e5df8c4a/packer-provisioner-ansible-local2548893738
    laravel-ubuntu20-x86_64-ami:
    laravel-ubuntu20-x86_64-ami: PLAY [all] *********************************************************************
    laravel-ubuntu20-x86_64-ami:
    laravel-ubuntu20-x86_64-ami: TASK [Gathering Facts] *********************************************************
    laravel-ubuntu20-x86_64-ami: ok: [127.0.0.1]
    laravel-ubuntu20-x86_64-ami:
    laravel-ubuntu20-x86_64-ami: TASK [base : Perform Safe Upgrade] *********************************************
    laravel-ubuntu20-x86_64-ami: changed: [127.0.0.1]
    laravel-ubuntu20-x86_64-ami:
    laravel-ubuntu20-x86_64-ami: TASK [base : Autoremove Unused Packages] ***************************************
    laravel-ubuntu20-x86_64-ami: ok: [127.0.0.1]
    laravel-ubuntu20-x86_64-ami:
    laravel-ubuntu20-x86_64-ami: TASK [base : Install Server Basics] ********************************************
    laravel-ubuntu20-x86_64-ami: changed: [127.0.0.1]
    laravel-ubuntu20-x86_64-ami:
    laravel-ubuntu20-x86_64-ami: TASK [base : Add Periodic Configuration] ***************************************
    laravel-ubuntu20-x86_64-ami: changed: [127.0.0.1]
    laravel-ubuntu20-x86_64-ami:
    laravel-ubuntu20-x86_64-ami: TASK [base : Add Unattended Upgrade Configuration] *****************************
    laravel-ubuntu20-x86_64-ami: changed: [127.0.0.1]
    laravel-ubuntu20-x86_64-ami:
    laravel-ubuntu20-x86_64-ami: TASK [base : Create backup directory for MOTD files] ***************************
    laravel-ubuntu20-x86_64-ami: changed: [127.0.0.1]
    laravel-ubuntu20-x86_64-ami:
    laravel-ubuntu20-x86_64-ami: TASK [base : Move unwanted MOTD files] *****************************************
    laravel-ubuntu20-x86_64-ami: changed: [127.0.0.1] => (item=10-help-text)
    laravel-ubuntu20-x86_64-ami: changed: [127.0.0.1] => (item=50-motd-news)
    laravel-ubuntu20-x86_64-ami: failed: [127.0.0.1] (item=80-esm) => {"ansible_loop_var": "item", "changed": true, "cmd": ["mv", "/etc/update-motd.d/80-esm", "/etc/update-motd.d.old/"], "delta": "0:00:00.004169", "end": "2022-02-07 14:44:38.654954", "item": "80-esm", "msg": "non-zero return code", "rc": 1, "start": "2022-02-07 14:44:38.650785", "stderr": "mv: cannot stat '/etc/update-motd.d/80-esm': No such file or directory", "stderr_lines": ["mv: cannot stat '/etc/update-motd.d/80-esm': No such file or directory"], "stdout": "", "stdout_lines": []}
    laravel-ubuntu20-x86_64-ami: failed: [127.0.0.1] (item=80-livepatch) => {"ansible_loop_var": "item", "changed": true, "cmd": ["mv", "/etc/update-motd.d/80-livepatch", "/etc/update-motd.d.old/"], "delta": "0:00:00.004293", "end": "2022-02-07 14:44:38.875805", "item": "80-livepatch", "msg": "non-zero return code", "rc": 1, "start": "2022-02-07 14:44:38.871512", "stderr": "mv: cannot stat '/etc/update-motd.d/80-livepatch': No such file or directory", "stderr_lines": ["mv: cannot stat '/etc/update-motd.d/80-livepatch': No such file or directory"], "stdout": "", "stdout_lines": []}
    laravel-ubuntu20-x86_64-ami:
    laravel-ubuntu20-x86_64-ami: RUNNING HANDLER [base : Start NTP] *********************************************
    laravel-ubuntu20-x86_64-ami:
    laravel-ubuntu20-x86_64-ami: RUNNING HANDLER [base : Restart Unattended Upgrades] ***************************
    laravel-ubuntu20-x86_64-ami:
    laravel-ubuntu20-x86_64-ami: PLAY RECAP *********************************************************************
    laravel-ubuntu20-x86_64-ami: 127.0.0.1                  : ok=7    changed=5    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0
    laravel-ubuntu20-x86_64-ami:
==> laravel-ubuntu20-x86_64-ami: Provisioning step had errors: Running the cleanup provisioner, if present...
==> laravel-ubuntu20-x86_64-ami: Terminating the source AWS instance...
==> laravel-ubuntu20-x86_64-ami: Cleaning up any extra volumes...
==> laravel-ubuntu20-x86_64-ami: No volumes to clean up, skipping
==> laravel-ubuntu20-x86_64-ami: Deleting temporary security group...
==> laravel-ubuntu20-x86_64-ami: Deleting temporary keypair...
Build 'laravel-ubuntu20-x86_64-ami' errored after 3 minutes 27 seconds: Error executing Ansible: Non-zero exit status: 2

==> Wait completed after 3 minutes 27 seconds

==> Some builds didn't complete successfully and had errors:
--> laravel-ubuntu20-x86_64-ami: Error executing Ansible: Non-zero exit status: 2

==> Builds finished but no artifacts were created.
fideloper commented 2 years ago

Gotcha!

The debconf output is ignorable then.

This failed in an Ansible step Move unwanted MOTD files

That happened because the reference material I used was likely for Ubuntu 18.04 instead of 20.04, and the "stock" files that exist in /etc/update-motd.d/ likely changed. Specifically, file 80-livepatch no longer exists there.

That's easily fixable, but I don't know when I'll return to this project next.

You can remove this line (- include: motd.yml) so it doesn't attempt to do any of that.

However you may run into other issues here as well. As I said, the project isn't even in an alpha state really yet. Specifically I don't recall if I finished the Nginx / PHP-FPM configuration, and related permissions/user creation.