Skip to content

issue in the playbook setup #1

@ghost

Description

Hi @imran78688 ,
The issue is in setting up the vpc-setup in the ansible-aws project.
The setup in the recording was throwing the error continuously
https://docs.ansible.com/ansible/latest/collections/ansible/builtin/include_vars_module.html
I have refered above and added them as it is
i have chaged the extension to .txt to .yaml in vars/vpc_setup
below are the code
`- hosts: localhost
connection: local
gather_facts: False
tasks:
- name: Import VPC Variables
ansible.builtin.include_vars:
dir: vars
files_matching: vpc_setup.yaml

- name: Create vprofile VPC
  ec2_vpc_net:
          name: "{{vpc_name}}"
          cidr_block: "{{vpcCidr}}"
          region: "{{region}}"
          dns_support: yes
          dns_hostnames: yes
          tenancy: default
          state: "{{state}}"
  register: vpcout

`
for vars
bastion-setup.yaml
vpc_setup.yaml

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions