GithubHelp home page GithubHelp logo

ansible-role-proxmox's Introduction

proxmox

Simple ansible role to install Proxmox VE on Debian as described in https://pve.proxmox.com/wiki/Install_Proxmox_VE_on_Debian_Stretch and https://pve.proxmox.com/wiki/Install_Proxmox_VE_on_Debian_Buster

Requirements

None.

Role Variables

If the role variable proxmox_pveadmins is defined a PVE group 'admin' is created and the ACL is updated in that way that members of the group 'admin' are assigned the 'Administrator' role for the whole system (path /):

% sudo pvesh get /access/acl
┌──────┬───────────────┬───────┬───────┬───────────┐
│ path │ roleid        │ type  │ ugid  │ propagate │
╞══════╪═══════════════╪═══════╪═══════╪═══════════╡
│ /    │ Administrator │ group │ admin │ 1         │
└──────┴───────────────┴───────┴───────┴───────────┘

The list of users which will be added to this admin group is set with this role variable:

# proxmox_pveadmins: [ 'janedoe' , 'johndoe' ]

Dependencies

None.

Additional Notes

If you use the role Oefenweb/ansible-hostname (which sets the hostname and /etc/hosts) you should put the following in group_vars/proxmox.yml (together with a host group proxmox):

---
hostname_hostname_ip_address: "{{ ansible_default_ipv4.address }}"

to avoid changes /etc/hosts by this role.

That is because Oefenweb/ansible-hostname makes sure that the following line exists in /etc/hosts:

127.0.1.1 proxmox.example.com proxmox

but Proxmox needs the external IP-Addresss to be resolvable. That means the /etc/hosts line should look like this:

192.0.2.1 proxmox.example.com proxmox

Further more, if you have use a Proxmox/Ceph cluster with two rings and a ceph network, a host group cluster is needed and something like this should be added in group_vars/cluster.yml:

---
hostname_additional_hosts:
  - ip_address: 10.88.0.1
    hostname: alpha01.ring0
  - ip_address: 10.88.0.2
    hostname: alpha02.ring0
  - ip_address: 10.88.0.3
    hostname: alpha03.ring0
  - ip_address: 10.89.0.1
    hostname: alpha01.ring1
  - ip_address: 10.89.0.2
    hostname: alpha02.ring1
  - ip_address: 10.89.0.3
    hostname: alpha03.ring1
  - ip_address: 10.77.0.1
    hostname: alpha01.ceph
  - ip_address: 10.77.0.2
    hostname: alpha02.ceph
  - ip_address: 10.77.0.3
    hostname: alpha03.ceph

Example Playbook

For this example we will assume you have defined a host group proxmox in the inventory file hosts.

site-proxmox.yml:

---

    - hosts: proxmox
      roles:
         - { role: proxmox, proxmox_pveadmins: [ 'janedoe', 'johndoe' ] }

To run this playbook you would do ansible-playbook -i hosts site-proxmox.yml

License

MIT

Author Information

Darshaka Pathirana - https://synpro.solutions

ansible-role-proxmox's People

Contributors

jkirk avatar mika avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

goffinet mika

ansible-role-proxmox's Issues

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.