Skip to content
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

Merged
merged 4 commits into from Nov 22, 2018

Conversation

ashishrajsrivastava
Copy link
Contributor

Purpose

Does this introduce a breaking change?

  • Yes
  • [ x] No

Pull Request Type

What kind of change does this Pull Request introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • [ x] Documentation content changes
  • Other... Please describe:

How to Test

  • Install ansible
$ pip install ansible[azure]
  • [Optional] Install ansible role
$ ansible-galaxy install Azure.azure_preview_modules
$ pip install -r ~/.ansible/roles/Azure.azure_preview_modules/files/requirements-azure.txt
  • Get the sample playbook
git clone https://github.com/Azure-Samples/ansible-playbooks.git
cd ansible-playbooks
git checkout [branch-name]
  • Test the code
ansible-playbook <filename>.yml

What to Check

Verify that the playbook is successfully run.

Other Information

@Fred-sun
Copy link
Contributor

@zikalino Could you help to review this PR? This PR add documentation to fixed #49, Thanks!

Copy link
Contributor

@yuwzho yuwzho left a 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.
Copy link
Contributor

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,"

Copy link
Contributor

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

Copy link
Contributor Author

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.

@Fred-sun
Copy link
Contributor

@ashishrajsrivastava Thanks for your contribution, Could you recheck this PR according by yuwzho's comment? thanks!

@msftclas
Copy link

msftclas commented Oct 31, 2018

CLA assistant check
All CLA requirements met.

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.
Copy link
Contributor

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
Copy link
Contributor

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

@Fred-sun
Copy link
Contributor

Fred-sun commented Nov 5, 2018

@yuwzho

@ashishrajsrivastava
Copy link
Contributor Author

will be adding Ansible extension for Visual Studio code steps in readme as a part of another PR.

@yuwzho
Copy link
Contributor

yuwzho commented Nov 5, 2018

If installing Ansible extension, there is no need to install the Azure account extension. @yungezz Please correct me if anything wrong

@yungezz
Copy link
Collaborator

yungezz commented Nov 5, 2018

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.

@ashishrajsrivastava
Copy link
Contributor Author

ashishrajsrivastava commented Nov 5, 2018

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.

@Fred-sun
Copy link
Contributor

@yuwzho @yungezz Could you help confirm that how about the PR going ahead? merged or further review? Thanks!

@yuwzho yuwzho merged commit f4a97d7 into Azure-Samples:master Nov 22, 2018
@yuwzho
Copy link
Contributor

yuwzho commented Nov 22, 2018

@ashishrajsrivastava Thanks for your pr, sorry about the late response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Documentation not clear for create_virtualmachine_with_subnet_in_different_resource_group
5 participants