Help-packer-ansible

32 views
Skip to first unread message

ronny saavedra

unread,
Sep 26, 2019, 3:15:52 PM9/26/19
to Packer

My activity is to create templates for linux and windows in aws where I can create amis, someone could tell me how I can solve that error.

Ansible version: 2.8.5
Packer version: 1.4.3
Python version: 2.7.15+
1.png



 

















Megan Marsh

unread,
Sep 27, 2019, 12:55:56 PM9/27/19
to packe...@googlegroups.com
There's an error in your ansible playbook: "AttributeError: 'ShellModule' object has no attribute 'Echo'" 

I'd make sure your playbook works before trying to stick it into Packer; that way you only have to debug one thing at a time. 

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/4cc3ef34-68a7-46f1-a79f-dcd68a2d9c90%40googlegroups.com.

ronny saavedra

unread,
Sep 27, 2019, 1:17:26 PM9/27/19
to Packer
My playbook runs from this way:

 [ronny@ronny-HP-ProDesk-600-G1-SFF prueba]$ ansible-playbook -e @variables.yml ansible_newtemplate.yml 
 [WARNING]: provided hosts list is empty, only localhost is available. Note
that the implicit localhost does not match 'all'


PLAY [localhost] ***************************************************************

TASK [Gathering Facts] *********************************************************
ok: [localhost]

TASK [Buscar credenciales de AWS] **********************************************
ok: [localhost]

TASK [Abortar si faltan definir algunas variables] *****************************
skipping: [localhost]

TASK [Incluir variable de AMIs] ************************************************
ok: [localhost]

TASK [Definir Region AWS] ******************************************************
ok: [localhost]

TASK [Filtrar AMI deseada] *****************************************************
ok: [localhost]

TASK [Buscar el AMI mas reciente] **********************************************
ok: [localhost]

TASK [Definir variable para la AMI mas reciente] *******************************
ok: [localhost]

TASK [Definir variables acorde a la AMI seleccionada] **************************
ok: [localhost]

TASK [Formatear fecha y hora en variable] **************************************
ok: [localhost]

TASK [Generar string aleatorio] ************************************************
changed: [localhost]

TASK [Definir nombre de job aleatorio] *****************************************
ok: [localhost]

TASK [Crear directorio de trabajo] *********************************************
ok: [localhost]

TASK [Crear inventario] ********************************************************
changed: [localhost]

TASK [Crear archivo JSON para packer] ******************************************
changed: [localhost]

TASK [Crear archivo de variables] **********************************************
changed: [localhost]

TASK [Crear AMI de Windows Server 2016 con Packer] *****************************
changed: [localhost]

TASK [Mostrar resultado de creacion de AMI] ************************************
ok: [localhost] => {
    "msg": [
        [
            "packer build -var aws_region=us-east-1 -var vm_ami=ami-0b91c01eb7fffd30b -var vm_size=t3a.small -var os_adminuser=ec2-user -var vm_name=windows-server-2016 -machine-readable update_template-aeTcbdogsoab.json"
        ]
    ]
}

PLAY RECAP *********************************************************************
localhost                  : ok=17   changed=5    unreachable=0    failed=0    skipped=1    rescued=0    ignored=0   


Thanks 

Thanks for your answer Megan Marsh, after this you suggest me.

Here I leave you a link of my more specific problem
Reply all
Reply to author
Forward
0 new messages