Coder Social home page Coder Social logo

ansible-hetzner's Introduction

ansible-hetzner

Notes

Caution when using. Systems are rebooted and installed without further inquiry.

Platforms

Tested on RHEL / CentOS. Should work on all platforms.

Activate webservice

To use the webservice, go to Settings > Webservice settings in portal and define a password. You will receive your user via Mail from Hetzner.

Example playbook

- name: provision hetzner root server
  hosts: hetzner
  gather_facts: no
  remote_user: root

  vars:
    hetzner_webservice_username: "your_hetzner_webservice_user"
    hetzner_webservice_password: "your_hetzner_webservice_password"
    hetzner_image: "/root/.oldroot/nfs/install/../images/CentOS-75-64-minimal.tar.gz"
    hetzner_hostname: "hostname.example.com"

  tasks:
  - import_role:
      name: provision-hetzner

Example autosetup file

The following autosetup file will be used by default. Modify roles/provision-hetzner/templates/autosetup or create your own and set {{ hetzner_autosetup_file }}. Further details regarding the file can be found at Hetzner in the wiki.

DRIVE1 /dev/sda
DRIVE2 /dev/sdb
SWRAID 1
SWRAIDLEVEL 0
BOOTLOADER grub
HOSTNAME {{ hetzner_hostname }}
PART /boot ext3 512M
PART lvm vg0 500G
PART lvm cinder-volumes all

LV vg0 root / ext4 100G
LV vg0 swap swap swap 5G

IMAGE {{ hetzner_image }}

Hetzner offers a collection of images which can be set via {{ hetzner_image }}. Examples include:

  • archlinux-latest-64-minimal.tar.gz
  • CentOS-610-64-minimal.tar.gz
  • CentOS-75-64-minimal.tar.gz
  • CoreOS-1298-64-production.bin.bz2
  • Debian-811-jessie-64-minimal.tar.gz
  • Debian-95-stretch-64-minimal.tar.gz
  • Ubuntu-1604-xenial-64-minimal.tar.gz
  • Ubuntu-1710-artful-64-minimal.tar.gz
  • Ubuntu-1804-bionic-64-minimal.tar.gz

You can alos build a custom image and host it on a public webserver. In that case {{ hetzner_image }} needs to point to that location.

License

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

ansible-hetzner's People

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.