goldyfruit.ibmcloud_automation.ic_is_instance_security_group (1.0.4) — module

Manage VPC security group attachments to VSI on IBM Cloud.

| "added in version" 2.9 of goldyfruit.ibmcloud_automation"

Authors: Gaëtan Trellu (@goldyfruit)

preview | supported by community

Install collection

Install with ansible-galaxy collection install goldyfruit.ibmcloud_automation:==1.0.4


Add to requirements.yml

  collections:
    - name: goldyfruit.ibmcloud_automation
      version: 1.0.4

Description

When a network interface is added to a security group, the security group rules are applied to the network interface. A request body is not required, and if supplied, is ignored.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Attach security group VSI primary network interface
  ic_is_instance_security_group:
    instance: ibmcloud-vsi-baby
    group: ibmcloud-sec-group-baby
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Attach security group on specific VSI network interface
  ic_is_instance_security_group:
    instance: ibmcloud-vsi-baby
    interface: ibmcloud-interface-baby
    group: ibmcloud-sec-group-baby
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Detach security group from VSI primary network interface
  ic_is_instance_security_group:
    instance: ibmcloud-vsi-baby
    group: ibmcloud-sec-group-baby
    state: detach
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Detach security group from specific VSI network interface
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- ic_is_instance_security_group:
    instance: ibmcloud-vsi-baby
    interface: ibmcloud-interface-baby
    group: ibmcloud-sec-group-baby
    state: detach

Inputs

    
group:
    description:
    - The identity of the security group to attach to the interface.
    required: true

state:
    choices:
    - present
    - absent
    - attach
    - detach
    default: present
    description:
    - Should the resource be present or absent.
    type: str

instance:
    description:
    - VSI (Virtual Server Instance) where to attach the security group. If C(interface)
      options is not provided then security group will be attached to VSI primary network
      interface.
    required: true
    type: str

interface:
    description:
    - VSI network interface where to attach the security group.
    type: str