Giter Club home page Giter Club logo

Comments (18)

yaweiw avatar yaweiw commented on August 20, 2024

@yungezz

from ansible-playbooks.

yungezz avatar yungezz commented on August 20, 2024

@tanvirahmed2707 thanks for reporting the issue. We'll take a look at the issue. Since you're using AzureUSGovernment azure cloud environment except for public one, it's high suspiciously to related to this.

from ansible-playbooks.

tanvirahmed2707 avatar tanvirahmed2707 commented on August 20, 2024

@yungezz ... Thanks a lot for looking into it! I also thought that it's an issue with "AzureUSGovernement", but then first three tasks worked very good in the same environment. It's only failing at the Security Group creation task.

from ansible-playbooks.

yungezz avatar yungezz commented on August 20, 2024

let me check is there any bug in security group to work in non-public azure cloud.

from ansible-playbooks.

tanvirahmed2707 avatar tanvirahmed2707 commented on August 20, 2024

@yungezz were you able to find the issue with it?

from ansible-playbooks.

yungezz avatar yungezz commented on August 20, 2024

@tanvirahmed2707 sorry for late response. This is a bug in azure_rm_securitygroup module. I'm working on fixing it in ansible repo. Before the fixing is released in official release, you could use same fix in azure_preview_modules role to unblock now.

ansible-galaxy  install git+https://github.com/Azure/azure_preview_modules.git,fix-securitygroup

then in your playbook, reference this role

roles:
  - Azure.azure_preview_modules

let me know if you met any other issue.

from ansible-playbooks.

tanvirahmed2707 avatar tanvirahmed2707 commented on August 20, 2024

@yungezz thanks a lot for the fix! I'll try it out and let you know.

from ansible-playbooks.

yungezz avatar yungezz commented on August 20, 2024

hi @tanvirahmed2707 , the issue was fixed in upstream 2.7 release ansible/ansible#41123 and 2.5.x release ansible/ansible#41073. Please let us know if any furthur issue met.

from ansible-playbooks.

yungezz avatar yungezz commented on August 20, 2024

close the issue since fix is released in official ansible.

from ansible-playbooks.

bhardwahnitish19 avatar bhardwahnitish19 commented on August 20, 2024

Hi,
I am using ansible 2.7.4 with 'AzureUSGovernment' cloud, with Service Principal as authentication method. But, I am still facing the same issue. Could you please help.

Ansible version: 2.7.4
Python: 2.7.12

from ansible-playbooks.

yungezz avatar yungezz commented on August 20, 2024

@bhardwahnitish19 could you pls share the error message? thanks

from ansible-playbooks.

bhardwahnitish19 avatar bhardwahnitish19 commented on August 20, 2024

@yungezz Thanks for a quick response. It's the same error which is mentioned in the Issue description.

` PLAY [Get start timestamp] ******************************************************************************************************************************************************************

TASK [Gathering Facts] **********************************************************************************************************************************************************************
ok: [cloud]

TASK [set_fact] *****************************************************************************************************************************************************************************
ok: [cloud]

PLAY [Prepare to run the workload] **********************************************************************************************************************************************************

TASK [Gathering Facts] **********************************************************************************************************************************************************************
ok: [cloud]

TASK [include_tasks] ************************************************************************************************************************************************************************
included: /home/cello/cello/src/operator-dashboard/agent/ansible/roles/cloud_azure/prepare/tasks/apply.yml for cloud

TASK [Setup env specific variables] *********************************************************************************************************************************************************
ok: [cloud]

TASK [Retrieve azure specific image details] ************************************************************************************************************************************************
ok: [cloud]

TASK [Print azure image results] ************************************************************************************************************************************************************
ok: [cloud] => {
    "found_images": {
    "ansible_facts": {
        "azure_vmimages": []
    },
    "changed": false,
    "failed": false
    }
}

TASK [Create azure resource group] **********************************************************************************************************************************************************
fatal: [cloud]: FAILED! => {"changed": false, "msg": "Error creating or updating resource group myresourceGroup - Azure Error: SubscriptionNotFound\nMessage: The subscription '********' could not be found."}
    to retry, use: --limit @/home/cello/cello/src/operator-dashboard/agent/ansible/provcluster.retry

PLAY RECAP **********************************************************************************************************************************************************************************
cloud                      : ok=7    changed=0    unreachable=0    failed=1`

from ansible-playbooks.

yungezz avatar yungezz commented on August 20, 2024

thanks. I'll double check. just to double confirm, you have the azure_cloud setting to AzureUSGovernment in configuration already?

from ansible-playbooks.

bhardwahnitish19 avatar bhardwahnitish19 commented on August 20, 2024

@yungezz Yes, I have an AzureUSGovernment cloud. I am using Service Principal for authentication. I am trying to create some VMs with ansible with an existing resource group.
Please let me know if you need some more inputs.

Thanks for looking into this.

from ansible-playbooks.

yungezz avatar yungezz commented on August 20, 2024

just checked the code, the fix was in 2.7.4 release. @bhardwahnitish19 do you have environment variable AZURE_CLOUD_ENVIRONMENT set to AzureUSGovernment or cloud_environment set to AzureUSGovernment in credential file?

from ansible-playbooks.

bhardwahnitish19 avatar bhardwahnitish19 commented on August 20, 2024

I think I am missing it. Could you please tell me the name of the config file which needs this parameter. Do you have any reference document for it?

from ansible-playbooks.

yungezz avatar yungezz commented on August 20, 2024

https://docs.ansible.com/ansible/latest/scenario_guides/guide_azure.html

you can use either environment variable or configuration file. file name ~/.azure/credentials

from ansible-playbooks.

bhardwahnitish19 avatar bhardwahnitish19 commented on August 20, 2024

Thanks for sharing this. It worked perfectly after setting up cloud_environment really appreciate your help and quick response.

from ansible-playbooks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.