i have the below yml file which is working as expected
---
- hosts: local
- name: Example of provisioning servers
hosts: 127.0.0.1
connection: local
tasks:
- name: Modify security group
local_action:
module: ec2_group
name: ansible_trail
description: Modify SG Rules
region: us-east-1
rules:
- proto: tcp
from_port: 22
to_port: 22
cidr_ip: 198.168.45.23
purge_rules: true*
i want to repeat the same action for all of my security groups how to do that in ansible .
instead of assigning the name: optv5_ansible_trail i want to get the value from list or file.
Aucun commentaire:
Enregistrer un commentaire