Coder Social home page Coder Social logo

ptylenda / ironic-packer-template-windows2016 Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 24 KB

Windows Server 2016 template for QEMU with proxy capabilities, provisioned by Ansible playbook. Optimized for building qcow2 images for Ironic using QEMU.

License: MIT License

Batchfile 25.66% PowerShell 53.60% Python 20.25% Shell 0.49%
ironic windows windows-server-2016 packer packer-template ansible proxy openstack

ironic-packer-template-windows2016's Introduction

ironic-packer-template-windows2016

Packer template for Windows Server 2016, capable of Ansible provisioning behind a proxy. Simple playbook for updating proxy settings has been provided. Optimized for building qcow2 images for Ironic using QEMU.

Usage

Build (if you already have Virtio ISO):

$ packer build -only=qemu .\ubuntu1804.json

Or (downloads Virtio ISO and executes build):

$ ./build.sh

Notes

This template has been created in order to resolve problems with provisioning Windows Server 2016 behind a proxy. Keep in mind that:

  • For shell provisioners and propagation of proxy settings, use:
"environment_vars": [
    "FTP_PROXY={{ user `ftp_proxy` }}",
    "HTTPS_PROXY={{ user `https_proxy` }}",
    "HTTP_PROXY={{ user `http_proxy` }}",
    "NO_PROXY={{ user `no_proxy` }}",
    "ftp_proxy={{ user `ftp_proxy` }}",
    "http_proxy={{ user `http_proxy` }}",
    "https_proxy={{ user `https_proxy` }}",
    "no_proxy={{ user `no_proxy` }}"
  ]
  • For ansible-local provisioner use:
"extra_arguments": [
    "--extra-vars",
    "{'\"http_proxy\":\"{{ user `http_proxy` }}\", \"https_proxy\":\"{{ user `https_proxy` }}\", \"no_proxy\":\"{{ user `no_proxy` }}\", \"ftp_proxy\":\"{{ user `ftp_proxy` }}\"}'"
  ]

Then handle these variables appropriately in playbook, set environment variables, etc.

  • In case of ansible-local there are problems when specifying inventory_groups: even though connection type passed to ansible is "local", it gets ignored and regular SSH connection is used. This causes problems due to unauthorized key for passwordless login to localhost. As a workaround you have to specify inventory_file with ansible_connection specified explicitly, for example:
[windows]
127.0.0.1 ansible_connection=local

Note: tested with Ansible 2.6.1

ironic-packer-template-windows2016's People

Contributors

ptylenda avatar

Stargazers

 avatar  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.