first working configuration

This commit is contained in:
2021-05-25 16:43:40 +02:00
parent bc72c32c23
commit fd568c1001
4 changed files with 53 additions and 41 deletions

View File

@@ -23,5 +23,5 @@ users:
shell: /bin/bash shell: /bin/bash
lock_passwd: false lock_passwd: false
ssh-authorized-keys: ssh-authorized-keys:
- ssh-rsa AAAA ...your-public-ssh-key-goes-here... user@host - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCtU8bRGqwt13HgTbL/YDj19ljVUsZPTGFfdLUA4k4dPrVuQR77c7pdMPW25j/NS5LbnkKhEEoMJB7qzcGBBKiMAA9J30jJxqXeV48VUKNxByTEQEqQ8FpnQICpvFueEyP/AX6/gLy77a1IldTWabNmplJqxBkksn1P1q8EIzXlXu0Xj1WGNxW/yF+Unp28qvqNuWlLyAwOfMcYUO1a7XUsD3/vcjNySqH6TlJAf8VDTNidcZXvyWJf2WjSK85NNJCLSVDdJ5/595PnjWxYnML8gyDo0qUAxhx3jMVT3sa5Wd/aonMYNpm2YwjZQuFPksotvkEk7ZIqE6ejBh+oX52uwoVDG38TfQRkpxp6psn+ZtSaa+/Jf9eqHGWRgwrgSKP56ezvILZxcOzBfXcszGBYRLUMJbMqYpRAO24SfrYrKM5DKs9yFQHkgybcho406DCluQ5MhqiO4UPc22cQ8fxTSdLxLBlPOpP0rkgh5zz54DHhhmKgGzBIWxKfN+M+5CE= tobias@hqt
final_message: "The system is finally up, after $UPTIME seconds" final_message: "The system is finally up, after $UPTIME seconds"

View File

@@ -77,9 +77,9 @@ resource "libvirt_domain" "domain-ubuntu" {
user = var.ssh_username user = var.ssh_username
host = libvirt_domain.domain-ubuntu.network_interface[0].addresses[0] host = libvirt_domain.domain-ubuntu.network_interface[0].addresses[0]
private_key = file(var.ssh_private_key) private_key = file(var.ssh_private_key)
bastion_host = "ams-kvm-remote-host" #bastion_host = "my-jump-host."
bastion_user = "deploys" #bastion_user = "deploys"
bastion_private_key = file("~/.ssh/deploys.pem") #bastion_private_key = file("~/.ssh/deploys")
timeout = "2m" timeout = "2m"
} }
} }
@@ -89,7 +89,7 @@ resource "libvirt_domain" "domain-ubuntu" {
echo "[nginx]" > nginx.ini echo "[nginx]" > nginx.ini
echo "${libvirt_domain.domain-ubuntu.network_interface[0].addresses[0]}" >> nginx.ini echo "${libvirt_domain.domain-ubuntu.network_interface[0].addresses[0]}" >> nginx.ini
echo "[nginx:vars]" >> nginx.ini echo "[nginx:vars]" >> nginx.ini
echo "ansible_ssh_common_args='-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ProxyCommand=\"ssh -W %h:%p -q ams-kvm-remote-host\"'" >> nginx.ini echo "ansible_ssh_common_args='-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ProxyCommand=\"ssh -W %h:%p -q hqt\"'" >> nginx.ini
ansible-playbook -u ${var.ssh_username} --private-key ${var.ssh_private_key} -i nginx.ini ansible/playbook.yml ansible-playbook -u ${var.ssh_username} --private-key ${var.ssh_private_key} -i nginx.ini ansible/playbook.yml
EOT EOT
} }

View File

@@ -1,9 +1,18 @@
{ {
"version": 4, "version": 4,
"terraform_version": "0.15.3", "terraform_version": "0.15.3",
"serial": 21, "serial": 45,
"lineage": "af915bb1-8f21-5cbd-1e34-2c8a151a91f9", "lineage": "af915bb1-8f21-5cbd-1e34-2c8a151a91f9",
"outputs": {}, "outputs": {
"ip": {
"value": "192.168.20.73",
"type": "string"
},
"url": {
"value": "http://192.168.20.73",
"type": "string"
}
},
"resources": [ "resources": [
{ {
"mode": "data", "mode": "data",
@@ -34,9 +43,9 @@
"schema_version": 0, "schema_version": 0,
"attributes": { "attributes": {
"filename": null, "filename": null,
"id": "e2cb3caeafadc71aab833600ac7612d9c41b755e2549ad47a8d3ae2a625c4821", "id": "1349ad532dd23c8b99a91bfaf16f2f0cbddc92c6780bf5cac2f5544adaf091a1",
"rendered": "#cloud-config\n# vim: syntax=yaml\n# examples:\n# https://cloudinit.readthedocs.io/en/latest/topics/examples.html\nbootcmd:\n - echo 192.168.0.1 gw.homedns.xyz \u003e\u003e /etc/hosts\nruncmd:\n - [ ls, -l, / ]\n - [ sh, -xc, \"echo $(date) ': hello world!'\" ]\nssh_pwauth: true\ndisable_root: false\nchpasswd:\n list: |\n root:password\n expire: false\npackage_update: true\npackages: ['qemu-guest-agent']\nusers:\n - name: ubuntu\n sudo: ALL=(ALL) NOPASSWD:ALL\n groups: users, admin\n home: /home/ubuntu\n shell: /bin/bash\n lock_passwd: false\n ssh-authorized-keys:\n - ssh-rsa AAAA ...your-public-ssh-key-goes-here... user@host\nfinal_message: \"The system is finally up, after $UPTIME seconds\"\n", "rendered": "#cloud-config\n# vim: syntax=yaml\n# examples:\n# https://cloudinit.readthedocs.io/en/latest/topics/examples.html\nbootcmd:\n - echo 192.168.0.1 gw.homedns.xyz \u003e\u003e /etc/hosts\nruncmd:\n - [ ls, -l, / ]\n - [ sh, -xc, \"echo $(date) ': hello world!'\" ]\nssh_pwauth: true\ndisable_root: false\nchpasswd:\n list: |\n root:password\n expire: false\npackage_update: true\npackages: ['qemu-guest-agent']\nusers:\n - name: ubuntu\n sudo: ALL=(ALL) NOPASSWD:ALL\n groups: users, admin\n home: /home/ubuntu\n shell: /bin/bash\n lock_passwd: false\n ssh-authorized-keys:\n - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCtU8bRGqwt13HgTbL/YDj19ljVUsZPTGFfdLUA4k4dPrVuQR77c7pdMPW25j/NS5LbnkKhEEoMJB7qzcGBBKiMAA9J30jJxqXeV48VUKNxByTEQEqQ8FpnQICpvFueEyP/AX6/gLy77a1IldTWabNmplJqxBkksn1P1q8EIzXlXu0Xj1WGNxW/yF+Unp28qvqNuWlLyAwOfMcYUO1a7XUsD3/vcjNySqH6TlJAf8VDTNidcZXvyWJf2WjSK85NNJCLSVDdJ5/595PnjWxYnML8gyDo0qUAxhx3jMVT3sa5Wd/aonMYNpm2YwjZQuFPksotvkEk7ZIqE6ejBh+oX52uwoVDG38TfQRkpxp6psn+ZtSaa+/Jf9eqHGWRgwrgSKP56ezvILZxcOzBfXcszGBYRLUMJbMqYpRAO24SfrYrKM5DKs9yFQHkgybcho406DCluQ5MhqiO4UPc22cQ8fxTSdLxLBlPOpP0rkgh5zz54DHhhmKgGzBIWxKfN+M+5CE= tobias@hqt \nfinal_message: \"The system is finally up, after $UPTIME seconds\"\n",
"template": "#cloud-config\n# vim: syntax=yaml\n# examples:\n# https://cloudinit.readthedocs.io/en/latest/topics/examples.html\nbootcmd:\n - echo 192.168.0.1 gw.homedns.xyz \u003e\u003e /etc/hosts\nruncmd:\n - [ ls, -l, / ]\n - [ sh, -xc, \"echo $(date) ': hello world!'\" ]\nssh_pwauth: true\ndisable_root: false\nchpasswd:\n list: |\n root:password\n expire: false\npackage_update: true\npackages: ['qemu-guest-agent']\nusers:\n - name: ubuntu\n sudo: ALL=(ALL) NOPASSWD:ALL\n groups: users, admin\n home: /home/ubuntu\n shell: /bin/bash\n lock_passwd: false\n ssh-authorized-keys:\n - ssh-rsa AAAA ...your-public-ssh-key-goes-here... user@host\nfinal_message: \"The system is finally up, after $UPTIME seconds\"\n", "template": "#cloud-config\n# vim: syntax=yaml\n# examples:\n# https://cloudinit.readthedocs.io/en/latest/topics/examples.html\nbootcmd:\n - echo 192.168.0.1 gw.homedns.xyz \u003e\u003e /etc/hosts\nruncmd:\n - [ ls, -l, / ]\n - [ sh, -xc, \"echo $(date) ': hello world!'\" ]\nssh_pwauth: true\ndisable_root: false\nchpasswd:\n list: |\n root:password\n expire: false\npackage_update: true\npackages: ['qemu-guest-agent']\nusers:\n - name: ubuntu\n sudo: ALL=(ALL) NOPASSWD:ALL\n groups: users, admin\n home: /home/ubuntu\n shell: /bin/bash\n lock_passwd: false\n ssh-authorized-keys:\n - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCtU8bRGqwt13HgTbL/YDj19ljVUsZPTGFfdLUA4k4dPrVuQR77c7pdMPW25j/NS5LbnkKhEEoMJB7qzcGBBKiMAA9J30jJxqXeV48VUKNxByTEQEqQ8FpnQICpvFueEyP/AX6/gLy77a1IldTWabNmplJqxBkksn1P1q8EIzXlXu0Xj1WGNxW/yF+Unp28qvqNuWlLyAwOfMcYUO1a7XUsD3/vcjNySqH6TlJAf8VDTNidcZXvyWJf2WjSK85NNJCLSVDdJ5/595PnjWxYnML8gyDo0qUAxhx3jMVT3sa5Wd/aonMYNpm2YwjZQuFPksotvkEk7ZIqE6ejBh+oX52uwoVDG38TfQRkpxp6psn+ZtSaa+/Jf9eqHGWRgwrgSKP56ezvILZxcOzBfXcszGBYRLUMJbMqYpRAO24SfrYrKM5DKs9yFQHkgybcho406DCluQ5MhqiO4UPc22cQ8fxTSdLxLBlPOpP0rkgh5zz54DHhhmKgGzBIWxKfN+M+5CE= tobias@hqt \nfinal_message: \"The system is finally up, after $UPTIME seconds\"\n",
"vars": null "vars": null
}, },
"sensitive_attributes": [] "sensitive_attributes": []
@@ -52,12 +61,12 @@
{ {
"schema_version": 0, "schema_version": 0,
"attributes": { "attributes": {
"id": "/mnt/data1/libvirt_tf_volumes/commoninit.iso;60a65440-35d1-aff5-ed2f-1cf5899e0adc", "id": "/mnt/data1/libvirt_tf_volumes/commoninit.iso;60acffa2-a30b-dd14-e627-608200b09a37",
"meta_data": "", "meta_data": "",
"name": "commoninit.iso", "name": "commoninit.iso",
"network_config": "version: 2\nethernets:\n ens3:\n dhcp4: true\n", "network_config": "version: 2\nethernets:\n ens3:\n dhcp4: true\n",
"pool": "tf_pool", "pool": "tf_pool",
"user_data": "#cloud-config\n# vim: syntax=yaml\n# examples:\n# https://cloudinit.readthedocs.io/en/latest/topics/examples.html\nbootcmd:\n - echo 192.168.0.1 gw.homedns.xyz \u003e\u003e /etc/hosts\nruncmd:\n - [ ls, -l, / ]\n - [ sh, -xc, \"echo $(date) ': hello world!'\" ]\nssh_pwauth: true\ndisable_root: false\nchpasswd:\n list: |\n root:password\n expire: false\npackage_update: true\npackages: ['qemu-guest-agent']\nusers:\n - name: ubuntu\n sudo: ALL=(ALL) NOPASSWD:ALL\n groups: users, admin\n home: /home/ubuntu\n shell: /bin/bash\n lock_passwd: false\n ssh-authorized-keys:\n - ssh-rsa AAAA ...your-public-ssh-key-goes-here... user@host\nfinal_message: \"The system is finally up, after $UPTIME seconds\"\n" "user_data": "#cloud-config\n# vim: syntax=yaml\n# examples:\n# https://cloudinit.readthedocs.io/en/latest/topics/examples.html\nbootcmd:\n - echo 192.168.0.1 gw.homedns.xyz \u003e\u003e /etc/hosts\nruncmd:\n - [ ls, -l, / ]\n - [ sh, -xc, \"echo $(date) ': hello world!'\" ]\nssh_pwauth: true\ndisable_root: false\nchpasswd:\n list: |\n root:password\n expire: false\npackage_update: true\npackages: ['qemu-guest-agent']\nusers:\n - name: ubuntu\n sudo: ALL=(ALL) NOPASSWD:ALL\n groups: users, admin\n home: /home/ubuntu\n shell: /bin/bash\n lock_passwd: false\n ssh-authorized-keys:\n - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCtU8bRGqwt13HgTbL/YDj19ljVUsZPTGFfdLUA4k4dPrVuQR77c7pdMPW25j/NS5LbnkKhEEoMJB7qzcGBBKiMAA9J30jJxqXeV48VUKNxByTEQEqQ8FpnQICpvFueEyP/AX6/gLy77a1IldTWabNmplJqxBkksn1P1q8EIzXlXu0Xj1WGNxW/yF+Unp28qvqNuWlLyAwOfMcYUO1a7XUsD3/vcjNySqH6TlJAf8VDTNidcZXvyWJf2WjSK85NNJCLSVDdJ5/595PnjWxYnML8gyDo0qUAxhx3jMVT3sa5Wd/aonMYNpm2YwjZQuFPksotvkEk7ZIqE6ejBh+oX52uwoVDG38TfQRkpxp6psn+ZtSaa+/Jf9eqHGWRgwrgSKP56ezvILZxcOzBfXcszGBYRLUMJbMqYpRAO24SfrYrKM5DKs9yFQHkgybcho406DCluQ5MhqiO4UPc22cQ8fxTSdLxLBlPOpP0rkgh5zz54DHhhmKgGzBIWxKfN+M+5CE= tobias@hqt \nfinal_message: \"The system is finally up, after $UPTIME seconds\"\n"
}, },
"sensitive_attributes": [], "sensitive_attributes": [],
"private": "bnVsbA==", "private": "bnVsbA==",
@@ -76,13 +85,12 @@
"provider": "provider[\"registry.terraform.io/dmacvicar/libvirt\"]", "provider": "provider[\"registry.terraform.io/dmacvicar/libvirt\"]",
"instances": [ "instances": [
{ {
"status": "tainted",
"schema_version": 0, "schema_version": 0,
"attributes": { "attributes": {
"arch": "x86_64", "arch": "x86_64",
"autostart": false, "autostart": false,
"boot_device": [], "boot_device": [],
"cloudinit": "/mnt/data1/libvirt_tf_volumes/commoninit.iso;60a65440-35d1-aff5-ed2f-1cf5899e0adc", "cloudinit": "/mnt/data1/libvirt_tf_volumes/commoninit.iso;60acffa2-a30b-dd14-e627-608200b09a37",
"cmdline": null, "cmdline": null,
"console": [ "console": [
{ {
@@ -127,7 +135,7 @@
"type": "spice" "type": "spice"
} }
], ],
"id": "7bb804b9-7827-465b-9c21-dc2db6417052", "id": "b271dfe1-d2ff-4b1c-9c78-f62379f66e23",
"initrd": "", "initrd": "",
"kernel": "", "kernel": "",
"machine": "pc", "machine": "pc",
@@ -137,12 +145,12 @@
"network_interface": [ "network_interface": [
{ {
"addresses": [ "addresses": [
"192.168.20.64", "192.168.20.73",
"fe80::5054:ff:fe22:2ae7" "fe80::5054:ff:fe0e:c4df"
], ],
"bridge": "br0", "bridge": "br0",
"hostname": "terraform-kvm-ansible", "hostname": "terraform-kvm-ansible",
"mac": "52:54:00:22:2A:E7", "mac": "52:54:00:0E:C4:DF",
"macvtap": "", "macvtap": "",
"network_id": "", "network_id": "",
"network_name": "", "network_name": "",
@@ -177,7 +185,7 @@
{ {
"schema_version": 0, "schema_version": 0,
"attributes": { "attributes": {
"allocation": 221347414016, "allocation": 220974116864,
"available": null, "available": null,
"capacity": 1967792529408, "capacity": 1967792529408,
"id": "40b537c5-c26e-49d3-9660-3bfe18eb0907", "id": "40b537c5-c26e-49d3-9660-3bfe18eb0907",

View File

@@ -1,7 +1,7 @@
{ {
"version": 4, "version": 4,
"terraform_version": "0.15.3", "terraform_version": "0.15.3",
"serial": 18, "serial": 42,
"lineage": "af915bb1-8f21-5cbd-1e34-2c8a151a91f9", "lineage": "af915bb1-8f21-5cbd-1e34-2c8a151a91f9",
"outputs": {}, "outputs": {},
"resources": [ "resources": [
@@ -34,9 +34,9 @@
"schema_version": 0, "schema_version": 0,
"attributes": { "attributes": {
"filename": null, "filename": null,
"id": "e2cb3caeafadc71aab833600ac7612d9c41b755e2549ad47a8d3ae2a625c4821", "id": "1349ad532dd23c8b99a91bfaf16f2f0cbddc92c6780bf5cac2f5544adaf091a1",
"rendered": "#cloud-config\n# vim: syntax=yaml\n# examples:\n# https://cloudinit.readthedocs.io/en/latest/topics/examples.html\nbootcmd:\n - echo 192.168.0.1 gw.homedns.xyz \u003e\u003e /etc/hosts\nruncmd:\n - [ ls, -l, / ]\n - [ sh, -xc, \"echo $(date) ': hello world!'\" ]\nssh_pwauth: true\ndisable_root: false\nchpasswd:\n list: |\n root:password\n expire: false\npackage_update: true\npackages: ['qemu-guest-agent']\nusers:\n - name: ubuntu\n sudo: ALL=(ALL) NOPASSWD:ALL\n groups: users, admin\n home: /home/ubuntu\n shell: /bin/bash\n lock_passwd: false\n ssh-authorized-keys:\n - ssh-rsa AAAA ...your-public-ssh-key-goes-here... user@host\nfinal_message: \"The system is finally up, after $UPTIME seconds\"\n", "rendered": "#cloud-config\n# vim: syntax=yaml\n# examples:\n# https://cloudinit.readthedocs.io/en/latest/topics/examples.html\nbootcmd:\n - echo 192.168.0.1 gw.homedns.xyz \u003e\u003e /etc/hosts\nruncmd:\n - [ ls, -l, / ]\n - [ sh, -xc, \"echo $(date) ': hello world!'\" ]\nssh_pwauth: true\ndisable_root: false\nchpasswd:\n list: |\n root:password\n expire: false\npackage_update: true\npackages: ['qemu-guest-agent']\nusers:\n - name: ubuntu\n sudo: ALL=(ALL) NOPASSWD:ALL\n groups: users, admin\n home: /home/ubuntu\n shell: /bin/bash\n lock_passwd: false\n ssh-authorized-keys:\n - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCtU8bRGqwt13HgTbL/YDj19ljVUsZPTGFfdLUA4k4dPrVuQR77c7pdMPW25j/NS5LbnkKhEEoMJB7qzcGBBKiMAA9J30jJxqXeV48VUKNxByTEQEqQ8FpnQICpvFueEyP/AX6/gLy77a1IldTWabNmplJqxBkksn1P1q8EIzXlXu0Xj1WGNxW/yF+Unp28qvqNuWlLyAwOfMcYUO1a7XUsD3/vcjNySqH6TlJAf8VDTNidcZXvyWJf2WjSK85NNJCLSVDdJ5/595PnjWxYnML8gyDo0qUAxhx3jMVT3sa5Wd/aonMYNpm2YwjZQuFPksotvkEk7ZIqE6ejBh+oX52uwoVDG38TfQRkpxp6psn+ZtSaa+/Jf9eqHGWRgwrgSKP56ezvILZxcOzBfXcszGBYRLUMJbMqYpRAO24SfrYrKM5DKs9yFQHkgybcho406DCluQ5MhqiO4UPc22cQ8fxTSdLxLBlPOpP0rkgh5zz54DHhhmKgGzBIWxKfN+M+5CE= tobias@hqt \nfinal_message: \"The system is finally up, after $UPTIME seconds\"\n",
"template": "#cloud-config\n# vim: syntax=yaml\n# examples:\n# https://cloudinit.readthedocs.io/en/latest/topics/examples.html\nbootcmd:\n - echo 192.168.0.1 gw.homedns.xyz \u003e\u003e /etc/hosts\nruncmd:\n - [ ls, -l, / ]\n - [ sh, -xc, \"echo $(date) ': hello world!'\" ]\nssh_pwauth: true\ndisable_root: false\nchpasswd:\n list: |\n root:password\n expire: false\npackage_update: true\npackages: ['qemu-guest-agent']\nusers:\n - name: ubuntu\n sudo: ALL=(ALL) NOPASSWD:ALL\n groups: users, admin\n home: /home/ubuntu\n shell: /bin/bash\n lock_passwd: false\n ssh-authorized-keys:\n - ssh-rsa AAAA ...your-public-ssh-key-goes-here... user@host\nfinal_message: \"The system is finally up, after $UPTIME seconds\"\n", "template": "#cloud-config\n# vim: syntax=yaml\n# examples:\n# https://cloudinit.readthedocs.io/en/latest/topics/examples.html\nbootcmd:\n - echo 192.168.0.1 gw.homedns.xyz \u003e\u003e /etc/hosts\nruncmd:\n - [ ls, -l, / ]\n - [ sh, -xc, \"echo $(date) ': hello world!'\" ]\nssh_pwauth: true\ndisable_root: false\nchpasswd:\n list: |\n root:password\n expire: false\npackage_update: true\npackages: ['qemu-guest-agent']\nusers:\n - name: ubuntu\n sudo: ALL=(ALL) NOPASSWD:ALL\n groups: users, admin\n home: /home/ubuntu\n shell: /bin/bash\n lock_passwd: false\n ssh-authorized-keys:\n - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCtU8bRGqwt13HgTbL/YDj19ljVUsZPTGFfdLUA4k4dPrVuQR77c7pdMPW25j/NS5LbnkKhEEoMJB7qzcGBBKiMAA9J30jJxqXeV48VUKNxByTEQEqQ8FpnQICpvFueEyP/AX6/gLy77a1IldTWabNmplJqxBkksn1P1q8EIzXlXu0Xj1WGNxW/yF+Unp28qvqNuWlLyAwOfMcYUO1a7XUsD3/vcjNySqH6TlJAf8VDTNidcZXvyWJf2WjSK85NNJCLSVDdJ5/595PnjWxYnML8gyDo0qUAxhx3jMVT3sa5Wd/aonMYNpm2YwjZQuFPksotvkEk7ZIqE6ejBh+oX52uwoVDG38TfQRkpxp6psn+ZtSaa+/Jf9eqHGWRgwrgSKP56ezvILZxcOzBfXcszGBYRLUMJbMqYpRAO24SfrYrKM5DKs9yFQHkgybcho406DCluQ5MhqiO4UPc22cQ8fxTSdLxLBlPOpP0rkgh5zz54DHhhmKgGzBIWxKfN+M+5CE= tobias@hqt \nfinal_message: \"The system is finally up, after $UPTIME seconds\"\n",
"vars": null "vars": null
}, },
"sensitive_attributes": [] "sensitive_attributes": []
@@ -52,12 +52,12 @@
{ {
"schema_version": 0, "schema_version": 0,
"attributes": { "attributes": {
"id": "/mnt/data1/libvirt_tf_volumes/commoninit.iso;60a65440-35d1-aff5-ed2f-1cf5899e0adc", "id": "/mnt/data1/libvirt_tf_volumes/commoninit.iso;60acffa2-a30b-dd14-e627-608200b09a37",
"meta_data": "", "meta_data": "",
"name": "commoninit.iso", "name": "commoninit.iso",
"network_config": "version: 2\nethernets:\n ens3:\n dhcp4: true\n", "network_config": "version: 2\nethernets:\n ens3:\n dhcp4: true\n",
"pool": "tf_pool", "pool": "tf_pool",
"user_data": "#cloud-config\n# vim: syntax=yaml\n# examples:\n# https://cloudinit.readthedocs.io/en/latest/topics/examples.html\nbootcmd:\n - echo 192.168.0.1 gw.homedns.xyz \u003e\u003e /etc/hosts\nruncmd:\n - [ ls, -l, / ]\n - [ sh, -xc, \"echo $(date) ': hello world!'\" ]\nssh_pwauth: true\ndisable_root: false\nchpasswd:\n list: |\n root:password\n expire: false\npackage_update: true\npackages: ['qemu-guest-agent']\nusers:\n - name: ubuntu\n sudo: ALL=(ALL) NOPASSWD:ALL\n groups: users, admin\n home: /home/ubuntu\n shell: /bin/bash\n lock_passwd: false\n ssh-authorized-keys:\n - ssh-rsa AAAA ...your-public-ssh-key-goes-here... user@host\nfinal_message: \"The system is finally up, after $UPTIME seconds\"\n" "user_data": "#cloud-config\n# vim: syntax=yaml\n# examples:\n# https://cloudinit.readthedocs.io/en/latest/topics/examples.html\nbootcmd:\n - echo 192.168.0.1 gw.homedns.xyz \u003e\u003e /etc/hosts\nruncmd:\n - [ ls, -l, / ]\n - [ sh, -xc, \"echo $(date) ': hello world!'\" ]\nssh_pwauth: true\ndisable_root: false\nchpasswd:\n list: |\n root:password\n expire: false\npackage_update: true\npackages: ['qemu-guest-agent']\nusers:\n - name: ubuntu\n sudo: ALL=(ALL) NOPASSWD:ALL\n groups: users, admin\n home: /home/ubuntu\n shell: /bin/bash\n lock_passwd: false\n ssh-authorized-keys:\n - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCtU8bRGqwt13HgTbL/YDj19ljVUsZPTGFfdLUA4k4dPrVuQR77c7pdMPW25j/NS5LbnkKhEEoMJB7qzcGBBKiMAA9J30jJxqXeV48VUKNxByTEQEqQ8FpnQICpvFueEyP/AX6/gLy77a1IldTWabNmplJqxBkksn1P1q8EIzXlXu0Xj1WGNxW/yF+Unp28qvqNuWlLyAwOfMcYUO1a7XUsD3/vcjNySqH6TlJAf8VDTNidcZXvyWJf2WjSK85NNJCLSVDdJ5/595PnjWxYnML8gyDo0qUAxhx3jMVT3sa5Wd/aonMYNpm2YwjZQuFPksotvkEk7ZIqE6ejBh+oX52uwoVDG38TfQRkpxp6psn+ZtSaa+/Jf9eqHGWRgwrgSKP56ezvILZxcOzBfXcszGBYRLUMJbMqYpRAO24SfrYrKM5DKs9yFQHkgybcho406DCluQ5MhqiO4UPc22cQ8fxTSdLxLBlPOpP0rkgh5zz54DHhhmKgGzBIWxKfN+M+5CE= tobias@hqt \nfinal_message: \"The system is finally up, after $UPTIME seconds\"\n"
}, },
"sensitive_attributes": [], "sensitive_attributes": [],
"private": "bnVsbA==", "private": "bnVsbA==",
@@ -79,10 +79,10 @@
"status": "tainted", "status": "tainted",
"schema_version": 0, "schema_version": 0,
"attributes": { "attributes": {
"arch": null, "arch": "x86_64",
"autostart": null, "autostart": false,
"boot_device": [], "boot_device": [],
"cloudinit": "/mnt/data1/libvirt_tf_volumes/commoninit.iso;60a65440-35d1-aff5-ed2f-1cf5899e0adc", "cloudinit": "/mnt/data1/libvirt_tf_volumes/commoninit.iso;60acffa2-a30b-dd14-e627-608200b09a37",
"cmdline": null, "cmdline": null,
"console": [ "console": [
{ {
@@ -104,7 +104,7 @@
], ],
"coreos_ignition": null, "coreos_ignition": null,
"cpu": null, "cpu": null,
"description": null, "description": "",
"disk": [ "disk": [
{ {
"block_device": "", "block_device": "",
@@ -115,9 +115,9 @@
"wwn": "" "wwn": ""
} }
], ],
"emulator": null, "emulator": "/usr/bin/qemu-system-x86_64",
"filesystem": [], "filesystem": [],
"firmware": null, "firmware": "",
"fw_cfg_name": "opt/com.coreos/config", "fw_cfg_name": "opt/com.coreos/config",
"graphics": [ "graphics": [
{ {
@@ -127,29 +127,32 @@
"type": "spice" "type": "spice"
} }
], ],
"id": "4debffdc-9abf-495e-8230-ef7d6f032cf9", "id": "abb9c651-02d6-4bf8-b695-849b47dbfb95",
"initrd": null, "initrd": "",
"kernel": null, "kernel": "",
"machine": null, "machine": "pc",
"memory": 512, "memory": 512,
"metadata": null, "metadata": null,
"name": "terraform-kvm-ansible", "name": "terraform-kvm-ansible",
"network_interface": [ "network_interface": [
{ {
"addresses": [], "addresses": [
"bridge": "", "192.168.20.71",
"fe80::5054:ff:feb6:e535"
],
"bridge": "br0",
"hostname": "terraform-kvm-ansible", "hostname": "terraform-kvm-ansible",
"mac": "", "mac": "52:54:00:B6:E5:35",
"macvtap": "", "macvtap": "",
"network_id": "", "network_id": "",
"network_name": "host-bridge", "network_name": "",
"passthrough": "", "passthrough": "",
"vepa": "", "vepa": "",
"wait_for_lease": true "wait_for_lease": true
} }
], ],
"nvram": [], "nvram": [],
"qemu_agent": false, "qemu_agent": true,
"running": true, "running": true,
"timeouts": null, "timeouts": null,
"vcpu": 1, "vcpu": 1,
@@ -160,6 +163,7 @@
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDB9fQ==", "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDB9fQ==",
"dependencies": [ "dependencies": [
"libvirt_cloudinit_disk.commoninit", "libvirt_cloudinit_disk.commoninit",
"libvirt_pool.tf_pool",
"libvirt_volume.ubuntu-qcow2" "libvirt_volume.ubuntu-qcow2"
] ]
} }
@@ -174,7 +178,7 @@
{ {
"schema_version": 0, "schema_version": 0,
"attributes": { "attributes": {
"allocation": 221347414016, "allocation": 220629524480,
"available": null, "available": null,
"capacity": 1967792529408, "capacity": 1967792529408,
"id": "40b537c5-c26e-49d3-9660-3bfe18eb0907", "id": "40b537c5-c26e-49d3-9660-3bfe18eb0907",