Giter Club home page Giter Club logo

ansible-vmware-provisioning's Issues

AnsibleFest Q: Can this be used with packer?

I wanted to try to add some of the topics that came up in the Q&A as issues so that hopefully I could come back to them. One person asked if this could be used with HashiCorp's packer to deploy images. Resolution of this would mean including an example of how that might work in the playbook if that is possible.

IP is not being set correctly.

Hello, was just trying to use some of the options in your playbook but I am unable to set the IP correctly via sed command.

The VM is being created and booting correctly. There are no errors being shown either.

  • hosts: 127.0.0.1
    connection: local
    user: root
    sudo: false
    gather_facts: false
    serial: 1
    vars:
    app_name: "testvmappsetip"
    server_ip: "10.10.10.245"
    vcenter_username: "user"
    vcenter_hostname: "vsphere.example.com"
    app_datacenter: "Datacenter - City, MO"
    cluster: "Datacenter - Production_Intel"
    vm_root_user: "root"
    vars_prompt:
    • name: "vcenter_password"
      prompt: "Enter Password"
      private: yes
      tasks:

    • name: "PROVISION | Create VM from Template"
      vmware_guest:
      hostname: "{{ vcenter_hostname }}"
      username: "{{ vcenter_username }}"
      password: "{{ vcenter_password }}"
      validate_certs: "false"
      datacenter: "{{ app_datacenter }}"
      cluster: "{{ cluster }}"
      state: "poweredon"
      name: "{{ app_name }}"
      template: app_default_official1

    • name: "Network | Change the IP address"
      local_action:
      module: vmware_vm_shell
      hostname: "{{ vcenter_hostname }}"
      username: "{{ vcenter_username}}"
      password: "{{ vcenter_password }}"
      vm_id: "{{ app_name }}"
      vm_username: "{{ vm_root_user }}"
      vm_password: password@123
      vm_shell: /bin/sed
      vm_shell_args: " -i 's/10.10.10.244/{{ server_ip }}/' /etc/sysconfig/network-scripts/ifcfg-eth0"
      vm_shell: /sbin/reboot

Update to >2.4 features

AS of at least Ansible 2.4 there are some cool yet simple features that were added such as:

  • ability to add notes to a VM
  • no requirement to specify the ESXi host to deploy to
  • better inventory/folder handling
  • support for marking a VM as a template to convert it

Implement some of the basic like adding notes or tags with examples to this repo, and specify it is for >2.4.

Remove legacy "resize" variable

This is a variable initially used to control application of the resizing tasks, but early on we changed the way this task is applied and call it conditionally at the end of the provisioning play. I just noticed this so these really don't do anything to control the task, but if you don't have resize defined as true in group_vars/all.yml or somewhere else it will break stuff.

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.