Giter VIP home page Giter VIP logo

ansible-role-vm-proxmox's Introduction

Creating a Virtual Machine with Ansible in Proxmox

Bu Ansible rolü, Proxmox üzerinde sanal makinelerin otomatik olarak oluşturulması ve yönetilmesi için kullanılır. Proxmox Virtual Environment (PVE) platformunu kullanarak VM'lerin kolayca dağıtılmasını ve konfigürasyonunun yapılmasını sağlar.

Özellikler

  • Ubuntu 22.04.4 LTS (Jammy Jellyfish)
  • Debian 12 (bullseye)

Önkoşullar

  • SSH Proxmox sunucunuza ssh keyinizi yüklemeniz
ssh-copy-id -i ~/.ssh/mykey [email protected]

Kullanım

  1. Envanterinizi Yapılandırın
    • inventory dizininde ki cluster_inventory.yml düzenlemeniz gerekmektedir. Cloud_init bölümü sunucunuzun alacağı id, parola ve network bilgileri buradan çekecektir.
    • Ayrıca tasks dizininden template ve vm'in alacağı VM ID düzenleyebilirsiniz. Ayrıca vm ile ilgili ram, cpu, disk gibi özellikleri *.vm.yml dosyasından düzenleyebilirsiniz.
hypervisor:
  hosts:
    proxmox:
      ansible_host: 192.168.1.10
      ansible_user: 'root'
      ansible_password: 'admin'
      ansible_connection: 'ssh'

  vars:
    proxmox:
    cloud_init_user: murat
    cloud_init_password: murat
    cloud_init_ip: '192.168.1.135/24'
    cloud_init_gw: '192.168.1.1'
  1. Playbook'u Çalıştır: Aşağıdaki komut ile Ansible playbook'unu çalıştırın:
ansible-playbook -i inventory/cluster_inventory.yml site.yml
ansible-role-vm-proxmox/
├── ansible.cfg
├── collections
│   └── requirements.yml
├── hosts
├── inventory
│   └── server_groups.yml
├── LICENSE
├── playbooks
│   └── roles
│       └── create-vm
│           ├── files
│           │   └── ssh_key.pub
│           ├── handlers
│           ├── meta
│           ├── output
│           ├── tasks
│           │   ├── 01_ubuntu_temp.yml
│           │   ├── 01_ubuntu_vm.yml
│           │   ├── 02_debian_temp.yml
│           │   ├── 02_debian_vm.yml
│           │   └── main.yml
│           ├── templates
│           └── vars
│               └── main.yml
├── README.md
└── site.yml

12 directories, 14 files

ansible-role-vm-proxmox's People

Contributors

murat-akpinar avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.