On 02.04.19 20:10, [email protected] wrote:
> 
> 
> Hello, 
> 
> I’m trying to call a playbook from Packer for the first time. I’m using the 
> Packer Ansible provisioner. The documentation says that Packer will 
> “dynamically create an inventory file to use with the playbook” If this is 
> the case, How should I edit my playbook? As it is now it has a “hosts” 
> entry - should I just remove that? 

Use hosts: all

Packer only makes the one host available in the inventory.

Sebastian

> It looks like:
> 
> - hosts: ec2lin
> 
>   remote_user: ec2-user
> 
>   become: yes
> 
>   become_user: root
> 
>   tasks:
> 
>   - name: run yum update -y using yum module
> 
>     yum:
> 
>       name: "*"
> 
>       state: latest
> 
> Thank You much for any help
> 

-- 
Sebastian Meyer
Linux Consultant & Trainer
Mail: [email protected]

B1 Systems GmbH
Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de
GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/e79621a5-d86e-0f6c-d3a6-69a6035bf593%40b1-systems.de.
For more options, visit https://groups.google.com/d/optout.

Reply via email to