I filed a new issue for 
this: https://github.com/ansible/ansible/issues/38809


Am Mittwoch, 11. April 2018 14:48:28 UTC+2 schrieb f.floimai...@gmail.com:
>
> Hi everyone!
>
>  
>
> I am using Ansible 2.5.0 and I think I found a bug in the 
> azure_rm_networkinterface module (either in the code or the documentation).
>
>  
>
> When I create a network-interface that should be used with an already 
> existing Network Security Group (NSG), it never uses the existing NSG, but 
> instead creates a new one with default values and the same name as the 
> networkinterface, which is the default behavior if no NSG is provided as a 
> parameter.
>
>  
>
> Steps to reproduce:
>
>  
>
> ---
>
> - name: Create VLAN, subnets, Public IPs and NICs for an Azure VM
>
>   hosts: localhost
>
>   connection: local
>
>   tasks:
>
>   - name: Create resource group
>
>     azure_rm_resourcegroup:
>
>       name: testRG
>
>       location: westeurope
>
>  
>
>   - name: Create storage account
>
>     azure_rm_storageaccount:
>
>       name: "testSTORAGE"
>
>       resource_group: "testRG"
>
>       account_type: Standard_LRS
>
>  
>
>   - name: Create a virtual network
>
>     azure_rm_virtualnetwork:
>
>       name: testVNET
>
>       resource_group: testRG
>
>       address_prefixes_cidr:
>
>           - "192.0.0.0/24"
>
>  
>
>   - name: Create VLAN subnet
>
>     azure_rm_subnet:
>
>       name: "testSUBNET"
>
>       virtual_network_name: "testVNET"
>
>       resource_group: "testRG"
>
>       address_prefix_cidr: "192.0.0.0/28"
>
>   
>
>   - name: Create network security group (firewall rules)
>
>     azure_rm_securitygroup:
>
>       resource_group: "testRG"
>
>       name: "testNSG"
>
>       state: present
>
>       purge_rules: yes
>
>       rules:
>
>         - name: 'AllowSSH'
>
>           protocol: Tcp
>
>           source_adress_prefix: '*'
>
>           destination_port_range: 22
>
>           access: Allow
>
>           priority: 1000
>
>           direction: Inbound
>
>  
>
>   - name: Create public IP address
>
>     azure_rm_publicipaddress:
>
>       name: "testVM_ip"
>
>       resource_group: "testRG"
>
>       allocation_method: Static
>
>       domain_name_label: "testvm"
>
>  
>
>   - name: Create virtual network interface card
>
>     azure_rm_networkinterface:
>
>       name: "testVM_nic"
>
>       resource_group: "testRG"
>
>       virtual_network_name: "testVNET"
>
>       subnet_name: "testSUBNET"
>
>         security_group_name: "testNSG" # this parameter seems to be ignored
>
>       ip_configurations:
>
>         - name: "testVM_ip"
>
>           public_ip_address_name: "testVM_ip"
>
>           primary: True
>
>  
>
> Maybe someone can spot an obvious error.
>
>  
>
> This is what I have in my resource group “testRG” as a result of above 
> operations vs. what I would expect
>
>  
>
> Resource Type   | Resource Name   | Expected | Status
>
>
> ----------------+-----------------+----------+---------------------------------
>
> Storage account | testSTORAGE     | yes      | OK
>
> virtual network | testVNET        | yes      | OK
>
> subnet          | testSUBNET      | yes      | OK
>
> nsg             | testNSG         | yes      | OK
>
> nsg             | testVM_nic      | no       | unwanted
>
> public IP       | testVM_ip       | yes      | OK 
>
> virtual NIC     | testVM_nic      | yes      | Points to wrong NSG 
> (testVM_nic)
>
>  
>
> Can someone reproduce this or find an error? Any help is appreciated.
>
>  
>
>  
>
>  
>
>  
>
> With best regards
>
>
>
> *Florian Floimair *Innovation - Software-Development -  VoIP & DevOps
>
>
> *COMMEND INTERNATIONAL GMBH *A-5020 Salzburg, Saalachstraße 51
> Tel: +43-662-85 62 25
> Fax: +43-662-85 62 26
> http://www.commend.com
>
>
>
> *Security and Communication by Commend *FN 178618z | LG Salzburg
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/32dfafd5-46a7-430f-8a79-0b65ef93aaf0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to