Skip to content

Instantly share code, notes, and snippets.

---
- name: Create Nutanix Files SMB Share
hosts: localhost
connection: local
gather_facts: no
vars_files:
- ./login.yml
vars:
fs_name: "test-fs-01"
---
- name: Create Nutanix Files File Server
hosts: localhost
connection: local
gather_facts: no
vars_files:
- ./login.yml
- ./login-ad.yml
vars:
ncli file-server create \
name=test-fs-01 \
dns-domain-name=ntnx.lab \
size-gib=1000 \
nvm-count=1 \
external-virtual-network=f513d008-8d20-4826-893e-5363918a6f46 \
external-virtual-network-mask=255.255.255.0 \
external-virtual-network-gateway=192.168.31.1 \
external-virtual-network-ips=192.168.31.11 \
dns-server-ip-address-list=192.168.10.170 \
---
- name: Get Avi API Version
hosts: localhost
connection: local
gather_facts: false
vars_files:
- ./login.yml
tasks:
- name: Get Avi API Version
---
- name: Create / Output Avi SE Group
hosts: localhost
connection: local
gather_facts: false
vars_files:
- ./login.yml
vars:
avi_cloud_name: Default-Cloud
{
"active_standby": true,
"aggressive_failure_detection": false,
"algo": "PLACEMENT_ALGO_DISTRIBUTED",
"app_cache_percent": 0,
"app_cache_threshold": 5,
"app_learning_memory_percent": 0,
"archive_shm_limit": 8,
"async_ssl": false,
"async_ssl_threads": 1,
---
- name: Ansible x Nutnaix Test
hosts: localhost
connection: local
gather_facts: no
vars:
prism_address: "Prism IP Address or FQDN"
prism_username: "admin"
prism_password: "nutanix/4u"
#cloud-config
disable_root: true
ssh_pwauth: true
package_upgrade: false
users:
- name: nutanix
lock-passwd: false
sudo: ALL=(ALL) NOPASSWD:ALL
$ESX = "192.168.10.164" # または esxi01.example.com
$VDS = "VDS_A"
$VMNIC1 = "vmnic1"
$VMNIC2 = "vmnic2"
$UPLINK1 = "UpLink_1"
$UPLINK2 = "UpLink_2"
$UPLINK_PG = "UpLinkPG_A"
$PG = "PG_A"
# ①VDS_Aへ新規ホストを追加
kind: ConfigMap
apiVersion: v1
metadata:
name: configmap-lab-centos-vm-01
namespace: lab-ns-31
data:
hostname: lab-centos-vm-01
user-data: |
I2Nsb3VkLWNvbmZpZwp1c2VyczoKICAtIG5hbWU6IGRlbW8KICAgIHNoZWxsOiAvYmluL2Jhc2gK
ICAgIHN1ZG86IEFMTD0oQUxMKSBOT1BBU1NXRDpBTEwKY2hwYXNzd2Q6CiAgICBsaXN0OiB8CiAg