Hi Folks,

I am wondering if it is possible to add multiple rules to an openstack 
security group using a loop mechanism such as with_items or with_dict?

I gave found examples of where this is possible in AWS using somthing like

security_groups:
- name: http_access
  rules:
    - proto: tcp
      from_port: 80
      to_port: 80
      cidr_ip: 0.0.0.0/0
    - proto: tcp
      from_port: 22
      to_port: 22
      cidr_ip: 0.0.0.0/0
      rules_egress: []

tasks:
  - name: add security groups.
    ec2_group:
      name: "{{ item.name }}"
      description: add security group rules
      region: "{{ item.region }}" 
      state: present
      rules: "{{ item.rules }}"
      rules_egress: "{{ item.rules_egress }}"
    with_items: security_groups


I have tried various configurations to try and achieve the same outcome 
using os_security_group and os_security_group_rule but cannot manage to get 
more than a single rule attached to any one security group.

Thanks in advance for your time.

Cheers,
Glyn

-- 
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/6b136070-851d-414a-ab70-0fdae22dcc3b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to