Last active
June 2, 2016 18:33
-
-
Save bigfleet/73953f6ab2eccd8613c788854174c790 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cfc/ansible-101/provisioning ☣> bin/discourse | |
SSH password: | |
PLAY [localhost] *************************************************************** | |
TASK [setup] ******************************************************************* | |
ok: [localhost] | |
TASK [include] ***************************************************************** | |
included: /Users/bigfleet/cfc/ansible-101/roles/discourse/tasks/provision-azure.yml for localhost | |
TASK [Create a resource group] ************************************************* | |
ok: [localhost] | |
TASK [Create storage account] ************************************************** | |
ok: [localhost] | |
TASK [Create virtual network] ************************************************** | |
ok: [localhost] | |
TASK [Add subnet] ************************************************************** | |
^C [ERROR]: User interrupted execution | |
cfc/ansible-101/provisioning ☣> bin/discourse | |
SSH password: | |
PLAY [localhost] *************************************************************** | |
TASK [setup] ******************************************************************* | |
ok: [localhost] | |
TASK [include] ***************************************************************** | |
included: /Users/bigfleet/cfc/ansible-101/roles/discourse/tasks/provision-azure.yml for localhost | |
TASK [Create a resource group] ************************************************* | |
ok: [localhost] | |
TASK [Create storage account] ************************************************** | |
ok: [localhost] | |
TASK [Create virtual network] ************************************************** | |
ok: [localhost] | |
TASK [Add subnet] ************************************************************** | |
ok: [localhost] | |
TASK [Create public ip] ******************************************************** | |
ok: [localhost] | |
TASK [Create security group that allows SSH] *********************************** | |
changed: [localhost] | |
TASK [Create NIC] ************************************************************** | |
ok: [localhost] | |
TASK [debug] ******************************************************************* | |
ok: [localhost] => { | |
"discourse_ssh_key": "ssh-dss AAAAB3NzaC1kc3MAAAEBAPrvHTTNrmuGZfk2q37MYj44MjDW/EfSXycvRvm7uggOK93/4Zz4W4ZcvCGCfdmM6fsJ+bf5jeYE/5b/G5pDLvzFHh+YMrgBOYQkGcJsAZhZUx8cAbtjNsNugqEnPNeI/7VILI173Z9nfmyfQ7Plk6DVfiXG5tApSYmCNazOGalkVksKsIzrJPpoQX6C+d5K8W50H6j6eacFgOTfRJy1aZ76GkHkmb4bu/J06lZqL9ZJiDTDyggxWwcmkptysb9KZcgv0CI5gXe3qjTJSSwdn4iMqmvfdt1B2EFIPEVK/KLH3kG7gAouOVpmifVC+trX6Qk4++jAf4AYVx4CTKDBQA8AAAAVAIXhpniSImaCKtb6/WL2pmXI2Oz7AAABAFS+f/qhCwHbnL0SANxPjj6GtLk+QAXfmFDsDDFXp+OqU3tGtfMAydKG5tJ3LF7JVh12VFRvGi5yvQfg9d06YkCqPCFuuxBkmXQHETI8cd17iRf0nqLVkKHkz5gwNCZ5HbCMC70JzOzE2HyXw/JupO/kTpHICMkAeoTvrNDhXaD6zysIb4USaPfxxcJh2CinuXAeXx8FTxjCfpmNS0KDoDF3zLW3TjzaIzFJARa7vxXScBWu9semjzvdBNOGTbwlkYXivWCilEnq43Xhs/een55c4t13+1RVNHPvmlNk1Nf12zCMYwlVQMVKfKZJCWv0djlFdHvt+0/Fv0TPBIuE+bgAAAEBALT71Bk1r+tLKFwEKCHM/nphER1FAVA7S6PSPCf7pWfzQZQlHdJQnHzZ9gmOEqZsm7hAUO3GomxOpVydtrWr4Rp/BABsqPPpdku3a/0m2iF8QkdjA3IeoGlzs5EZmedjpnPfEp4n81+Xdzf5wLtqdr6JVbfTNfTg6GxGn3YxjkzFdeA2rNFZdm8Y+GaBpr4I8PD1RonFVWBDedZVnbJ9dWSKlu0Nekb++QUoVbsutI22bfO5k3lsnqmWLDtvKwRfg2Q7GZyPlA3QYV6xedki1K7F89kaHbDVHbAM8EU7xUVRr1SLlkaZNTqojN+reGpUVc3o5AmnC08QVF5UZrB0Yms= jim@itsbspoke.com" | |
} | |
TASK [debug] ******************************************************************* | |
ok: [localhost] => { | |
"whoami": "bigfleet" | |
} | |
TASK [Create virtual machine] ************************************************** | |
fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg": "Error creating or updating virtual machine cfcdiscoursevm - The value of parameter linuxConfiguration.ssh.publicKeys.keyData is invalid."} | |
to retry, use: --limit @discourse.retry | |
PLAY RECAP ********************************************************************* | |
localhost : ok=9 changed=1 unreachable=0 failed=1 | |
cfc/ansible-101/provisioning ☣> | |
cfc/ansible-101/provisioning ☣> ansible --version | |
ansible 2.1.0.0 | |
config file = | |
configured module search path = Default w/o overrides | |
cfc/ansible-101/provisioning ☣> /usr/local/bin/pip --version | |
pip 8.1.2 from /Library/Python/2.7/site-packages (python 2.7) | |
cfc/ansible-101/provisioning ☣> /usr/local/bin/pip show azure | |
--- | |
Metadata-Version: 2.0 | |
Name: azure | |
Version: 2.0.0rc2 | |
Summary: Microsoft Azure Client Libraries for Python | |
Home-page: https://github.com/Azure/azure-sdk-for-python | |
Author: Microsoft Corporation | |
Author-email: ptvshelp@microsoft.com | |
Installer: pip | |
License: Apache License 2.0 | |
Location: /Library/Python/2.7/site-packages | |
Requires: azure-servicemanagement-legacy, azure-graphrbac, azure-storage, azure-servicebus, azure-mgmt | |
Classifiers: | |
Development Status :: 5 - Production/Stable | |
Programming Language :: Python | |
Programming Language :: Python :: 2 | |
Programming Language :: Python :: 2.7 | |
Programming Language :: Python :: 3 | |
Programming Language :: Python :: 3.3 | |
Programming Language :: Python :: 3.4 | |
Programming Language :: Python :: 3.5 | |
License :: OSI Approved :: Apache Software License |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Create a resource group | |
azure_rm_resourcegroup: | |
name: "{{discourse_azure_resource_group}}" | |
location: eastus | |
state: present | |
tags: | |
app: discourse | |
delete: never | |
- name: Create storage account | |
azure_rm_storageaccount: | |
resource_group: "{{discourse_azure_resource_group}}" | |
name: "{{discourse_azure_storageaccount_name}}" | |
state: present | |
account_type: Standard_LRS | |
- name: Create virtual network | |
azure_rm_virtualnetwork: | |
resource_group: "{{discourse_azure_resource_group}}" | |
name: "{{discourse_azure_virtualnetwork_name}}" | |
address_prefixes: "10.10.0.0/16" | |
- name: Add subnet | |
azure_rm_subnet: | |
resource_group: "{{discourse_azure_resource_group}}" | |
name: "{{discourse_azure_subnet_name}}" | |
address_prefix: "10.10.0.0/24" | |
virtual_network: "{{discourse_azure_virtualnetwork_name}}" | |
- name: Create public ip | |
azure_rm_publicipaddress: | |
resource_group: "{{discourse_azure_resource_group}}" | |
allocation_method: Static | |
name: "{{discourse_azure_publicipaddress_name}}" | |
- name: Create security group that allows SSH | |
azure_rm_securitygroup: | |
resource_group: "{{discourse_azure_resource_group}}" | |
name: "{{discourse_azure_securitygroup_name}}" | |
rules: | |
- name: SSH | |
protocol: Tcp | |
destination_port_range: 22 | |
access: Allow | |
priority: 101 | |
direction: Inbound | |
- name: Create NIC | |
azure_rm_networkinterface: | |
resource_group: "{{discourse_azure_resource_group}}" | |
name: "{{discourse_azure_networkinterface_name}}" | |
virtual_network: "{{discourse_azure_virtualnetwork_name}}" | |
subnet: "{{discourse_azure_subnet_name}}" | |
public_ip_name: "{{discourse_azure_publicipaddress_name}}" | |
security_group: "{{discourse_azure_securitygroup_name}}" | |
- name: Create virtual machine | |
azure_rm_virtualmachine: | |
resource_group: "{{discourse_azure_resource_group}}" | |
name: "{{discourse_azure_virtualmachine_name}}" | |
vm_size: Standard_D1 | |
storage_account: "{{discourse_azure_storageaccount_name}}" | |
storage_container: "{{discourse_azure_virtualmachine_name}}" | |
storage_blob: "{{discourse_azure_virtualmachine_name}}.vhd" | |
admin_username: "{{whoami}}" | |
# admin_password: "{{discourse_password}}" | |
ssh_password_enabled: False | |
# Looks like there's a real problem transferring public keys via API, we can do it later in base. | |
ssh_public_keys: | |
- path: "/home/{{whoami}}/.ssh/authorized_keys" | |
key_data: "{{discourse_ssh_key}}" | |
network_interfaces: "{{discourse_azure_networkinterface_name}}" | |
image: | |
offer: CentOS | |
publisher: OpenLogic | |
sku: '7.1' | |
version: latest |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment