New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added steps required to run this playbook #54
added steps required to run this playbook #54
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ashishrajsrivastava Thanks for your contribution. You PR looks good to me, and the part for running playbook can be placed in the README.md rather than a single playbook sample.
@@ -1,7 +1,13 @@ | |||
# Description | |||
# =========== | |||
# This playbook create an Azure VM with public IP, and subnet in another resource group. | |||
|
|||
# This Script will create two resource group, defined by variables resource_group and resource_group_secondary. Then it creates VM in resource_group and virtual network with defined subnets,nsg rules in resource_group_secondary. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"This Script will create two resource groups,"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please break this paragraph into two lines to avoid a long line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure let me add this to readme instead.
create_virtualmachine_with_subnet_in_different_resource_group.yml
Outdated
Show resolved
Hide resolved
@ashishrajsrivastava Thanks for your contribution, Could you recheck this PR according by yuwzho's comment? thanks! |
Azure cloud shell automatically logs you in your azure subscription so you need not to do anything extra other than login to cluod shell and run the ansible-playbook command with -e switch to provide | ||
resource_group_name variable value. | ||
|
||
To be able to run Cloud Shell in Visual Studio Code, you will need to install [Azure Account Extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.azure-account) in VS Code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we can use the Ansible VSCode extension to do the auth and upload file to cloud shell, and this extension will stream the log to vscode console. Besides this, the Ansible extension has support some Ansible specific feature, like auto completion for the playbook. So here we recommend to use the Ansible extension rather than Azure Account Extension.
# This Script will create two resource group, defined by variables resource_group and resource_group_secondary. | ||
# Then it creates VM in resource_group and virtual network with defined subnets,nsg rules in resource_group_secondary. | ||
# To be able to run this script you will need to be in active session of azure subscription where you want to create this infrastruture. | ||
# You have two options to achive this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we add the part in the readme, we can remove the following how to run part to avoid redundant
will be adding Ansible extension for Visual Studio code steps in readme as a part of another PR. |
If installing Ansible extension, there is no need to install the Azure account extension. @yungezz Please correct me if anything wrong |
you'll still need install azure account extension if you want to run playbook in cloudshell with VSCode. Ansible extension doesn't bundle any other extension. User instsall azure account extension per need. |
Yep to be able to run it in cloud shell in vscode user will have to install azure account extension too. If user opts for other execution target like docker,local ansible or via ssh then azure account extension will not be needed but then user will have to configure the authentication environment in respective options himself. |
@ashishrajsrivastava Thanks for your pr, sorry about the late response. |
Purpose
Does this introduce a breaking change?
Pull Request Type
What kind of change does this Pull Request introduce?
How to Test
$ ansible-galaxy install Azure.azure_preview_modules $ pip install -r ~/.ansible/roles/Azure.azure_preview_modules/files/requirements-azure.txt
What to Check
Verify that the playbook is successfully run.
Other Information