cloud-init example

rc-5.2.6
Alex_geth 1 year ago
parent a8f50bfb6b
commit f2e9b550bb

@ -1,38 +0,0 @@
#
# DECORT kvmvm module example
#
- hosts: ansible_master
tasks:
- name: create a VM named cloud-init_example
decort_kvmvm:
annotation: "VM managed by decort_kvmvm module"
authenticator: oauth2
app_id: "" # Application id from SSO Digital Energy
app_secret: "" # API key from SSO Digital Energy
controller_url: "" #"https://mr4.digitalenergy.online"
name: cloud-init_example
cpu: 2
ram: 2048
boot_disk: 10
image_name: "DECS Ubuntu 18.04 v1.2.3" #Name of OS image
networks:
- type: VINS
id: #VINS id
tags: "Ansible cloud init example"
state: present
rg_id: #Resource group id
ci_user_data:
- packages:
- apache2
- write_files:
- content: |
<div>
Hello World!
</div>
owner: user:user
path: /var/www/html/index.html
- hostname: test-apache
- ssh_keys:
- rsa_public: ssh-rsa AAAAOasDmLxnD= user@pc
delegate_to: localhost
register: simple_vm

@ -22,17 +22,17 @@
state: present state: present
rg_id: #Resource group id rg_id: #Resource group id
ci_user_data: ci_user_data:
- packages: packages:
- apache2 - apache2
- write_files: write_files:
- content: | - content: |
<div> <div>
Hello World! Hello World!
</div> </div>
owner: user:user owner: user:user
path: /var/www/html/index.html path: /var/www/html/index.html
- hostname: test-apache hostname: test-apache
- ssh_keys: ssh_keys:
- rsa_public: ssh-rsa AAAAOasDmLxnD= user@pc - rsa_public: ssh-rsa AAAAOasDmLxnD= user@pc
delegate_to: localhost delegate_to: localhost
register: simple_vm register: simple_vm

Loading…
Cancel
Save