Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build problem: proxmox: ansible-playbook: error: unrecognized arguments: #9

Open
DavidGhiro opened this issue Nov 3, 2020 · 2 comments

Comments

@DavidGhiro
Copy link

I'm trying to build a debian template. But I always get this error "proxmox: ansible-playbook: error: unrecognized arguments:". It looks like missing quotes. What am I doing wrong?

packer-provisioner-ansible plugin: SSH proxy: serving on 127.0.0.1:46181
==> proxmox: Executing Ansible: ansible-playbook --extra-vars packer_build_name=proxmox packer_builder_type=proxmox -o IdentitiesOnly=yes -i /tmp/packer-provisioner-ansible812930714 /usr/local/src/debian-10-amd64-proxmox/playbook/server-template.yml -e ansible_ssh_private_key_file=/tmp/ansible-key292977767 --extra-vars packer_http_addr=192.168.1.87:8306  --extra-vars vm_default_user=user --tags all,is_template --skip-tags openbsd,alpine
    proxmox: usage: ansible-playbook [-h] [--version] [-v] [-k] [--private-key PRIVATE_KEY_FILE] [-u REMOTE_USER] [-c CONNECTION] [-T TIMEOUT] [--ssh-common-args SSH_COMMON_ARGS] [--sftp-extra-args SFTP_EXTRA_ARGS]
    proxmox:                         [--scp-extra-args SCP_EXTRA_ARGS] [--ssh-extra-args SSH_EXTRA_ARGS] [--force-handlers] [--flush-cache] [-b] [--become-method BECOME_METHOD] [--become-user BECOME_USER] [-K] [-t TAGS] [--skip-tags SKIP_TAGS]
    proxmox:                         [-C] [--syntax-check] [-D] [-i INVENTORY] [--list-hosts] [-l SUBSET] [-e EXTRA_VARS] [--vault-id VAULT_IDS] [--ask-vault-pass | --vault-password-file VAULT_PASSWORD_FILES] [-f FORKS] [-M MODULE_PATH]
    proxmox:                         [--list-tasks] [--list-tags] [--step] [--start-at-task START_AT_TASK]
    proxmox:                         playbook [playbook ...]
    proxmox: ansible-playbook: error: unrecognized arguments:
Description:    Debian GNU/Linux 10 (buster) 10.6
Proxmox pve-manager/6.2-15/48bd51b6 (running kernel: 5.4.65-1-pve)
Packer v1.5.5

Your version of Packer is out of date! The latest version
is 1.6.5. You can update by downloading from www.packer.io/downloads.html
ansible 2.9.7
  python version = 3.7.3 (default, Jul 25 2020, 13:03:44) [GCC 8.3.0]
j2cli 0.3.10, Jinja2 2.11.2
@dreic
Copy link

dreic commented Jan 26, 2021

Hi @DavidGhiro I am facing same problem with Packer. Did you mange to figure out what's the problem?

==> amazon-ebs: Provisioning with Ansible...
--
397 | amazon-ebs: Setting up proxy adapter for Ansible....
398 | ==> amazon-ebs: Executing Ansible: ansible-playbook -e packer_build_name="amazon-ebs" -e packer_builder_type=amazon-ebs --ssh-extra-args '-o IdentitiesOnly=yes' --vault-password-file vault-password -e ansible_ssh_private_key_file=/tmp/ansible-key656332028 -i /tmp/packer-provisioner-ansible690532395 /codebuild/output/src777574068/src/github.com/xxxx/terraform-it-packer/packer/ansible-standard-linux/site.yml
399 | amazon-ebs: usage: ansible-playbook [-h] [--version] [-v] [-k]

xfrankbx added a commit to xfrankbx/packer-proxmox-templates that referenced this issue Feb 28, 2021
Fix for issue chriswayg#9
Fixes Ansible bug created by commit fd588b2
@patsevanton
Copy link

Hi!
I try build image by packer.
And i have same issue
Source code https://github.com/patsevanton/packer-ansible-active-directory-yandex-cloud

ansible-playbook -e packer_build_name="yandex" -e packer_builder_type=yandex --tags install --extra-vars ansible_port=5986 ansible_connection=winrm ansible_winrm_transport=basic ansible_user=Administrator ansible_password=xxxxxxxxx ansible_winrm_server_cert_validation=ignore -i /home/apatsev/packer-ansible-active-directory-yandex-cloud/packer-provisioner-inventory /home/apatsev/packer-ansible-active-directory-yandex-cloud/ansible/packer_active_directory.yml 

usage: ansible-playbook [-h] [--version] [-v] [-k] [--private-key PRIVATE_KEY_FILE] [-u REMOTE_USER] [-c CONNECTION] [-T TIMEOUT] [--ssh-common-args SSH_COMMON_ARGS]
                        [--sftp-extra-args SFTP_EXTRA_ARGS] [--scp-extra-args SCP_EXTRA_ARGS] [--ssh-extra-args SSH_EXTRA_ARGS] [--force-handlers] [--flush-cache] [-b]
                        [--become-method BECOME_METHOD] [--become-user BECOME_USER] [-K] [-t TAGS] [--skip-tags SKIP_TAGS] [-C] [--syntax-check] [-D] [-i INVENTORY] [--list-hosts]
                        [-l SUBSET] [-e EXTRA_VARS] [--vault-id VAULT_IDS] [--ask-vault-password | --vault-password-file VAULT_PASSWORD_FILES] [-f FORKS] [-M MODULE_PATH]
                        [--list-tasks] [--list-tags] [--step] [--start-at-task START_AT_TASK]
                        playbook [playbook ...]
ansible-playbook: error: unrecognized arguments: /home/apatsev/packer-ansible-active-directory-yandex-cloud/ansible/packer_active_directory.yml

Inventory

cat packer-provisioner-inventory 
default ansible_host=xxxx ansible_connection=winrm ansible_winrm_transport=basic ansible_shell_type=powershell ansible_user=apatsev ansible_port=5986

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants