Skip to content

Instantly share code, notes, and snippets.

@gowatana
Created May 22, 2025 14:45
Show Gist options
  • Select an option

  • Save gowatana/a543a362cc2a9629cc9e8f3db0efc54b to your computer and use it in GitHub Desktop.

Select an option

Save gowatana/a543a362cc2a9629cc9e8f3db0efc54b to your computer and use it in GitHub Desktop.
#cloud-config
disable_root: true
ssh_pwauth: true
package_upgrade: false
users:
- name: nutanix
shell: /bin/bash
lock-passwd: false
sudo: ALL=(ALL) NOPASSWD:ALL
chpasswd:
list: |
nutanix:nutanix/4u
expire: false
write_files:
- path: /etc/systemd/system/demo-web.service
content: |
[Unit]
Description=Demo Web Server
After=network.target
[Service]
ExecStart=/usr/bin/python3 -m http.server 8080 --directory /tmp/www
Restart=always
User=root
[Install]
WantedBy=multi-user.target
runcmd:
- mkdir -p /tmp/www
- echo "Web $(hostname -I | awk '{print $1}')" > /tmp/www/index.html
- systemctl daemon-reload
- systemctl enable --now demo-web
- firewall-cmd --permanent --add-port=8080/tcp
- firewall-cmd --reload
@gowatana
Copy link
Author

gowatana commented May 22, 2025

下記の投稿むけ。

Terraform で FVN の NAT VPC を構成してみる。Part-03:VPC と仮想マシンの作成(tf ファイル集約)
https://blog.ntnx.jp/entry/2025/05/22/235926

Terraform で FVN の NAT VPC を構成してみる。Part-04:VPC と仮想マシンの作成(tf ファイル分割)
https://blog.ntnx.jp/entry/2025/06/14/221256

Terraform で FVN の NAT VPC を構成してみる。Part-05:セグメントと仮想マシンの作成(Module 化)
https://blog.ntnx.jp/entry/2025/06/15/221729

Terraform で FVN の NAT VPC を構成してみる。Part-06:VPC ~ 仮想マシンの作成(Module 化)
https://blog.ntnx.jp/entry/2025/06/16/022510

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment