Git Product home page Git Product logo

ansible-windows's Introduction

Nabla roles/alban_andrieu_windows

This file was generated by Ansigenome. Do not edit this file directly but instead have a look at the files in the ./meta/ directory.

License Branch Donate Ansible Galaxy Platforms

Goal of this project is to launch ansible script using pywinrm. A VagrantFile is downloading a windows 2012 server VM that will be hosted on VirtualBox. Then we are launching Ansible script in order to set up this VM.

VM was taken from

https://vagrantcloud.com/opentable/boxes/win-2012r2-standard-amd64-nocm/versions/1.0.0/providers/virtualbox.box

###Requirements

On Ubuntu, where VirtualBox and Vagrant are installed, do not forge to do the following : sudo pip install https://github.com/diyan/pywinrm/archive/df049454a9309280866e0156805ccda12d71c93a.zip --upgrade

It is working with the following version :

#Os is an Ubuntu 12

python -V #Python 2.7.3 pip -V #pip 1.4.1 from /usr/local/lib/python2.7/dist-packages (python 2.7)

VBoxManage --version #4.3.28r100309

vagrant --version #Vagrant 2.3.1.0

vagrant plugin list #winrm (1.1.3) #vagrant-login (1.0.1, system) #vagrant-share (1.1.0, system)

ansible --version #ansible 1.7.2

Ansible 2.5.0 is required on order to have win_copy working on Windows 7 and Windows Server 2016

Check winrm in target host

winrm id
winrm get winrm/config

For oler version od Windows, please do

Set-Item WSMan:\localhost\Shell\MaxMemoryPerShellMB 5000
Set-Item WSMan:\localhost\Plugin\Microsoft.PowerShell\Quotas\MaxMemoryPerShellMB 5000

Restart-Service winrm

winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="0"}'

On the windows VM :

Try :

powershell -File upgrade_to_ps3.ps1
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%systemdrive%\chocolatey\bin
cinst powershell
choco install powershell
choco upgrade powershell
powershell -File ConfigureRemotingForAnsible.ps1

On the windows VM : Install PowerShell Configure remoting Disable password

Documentation

More information about alban.andrieu.windows can be found in the TODO official alban.andrieu.windows documentation.

Role variables

List of default variables available in the inventory:

windows_enabled: yes                       # Enable module

#ansible_ssh_user: vagrant
#ansible_ssh_pass: vagrant
#target port
#ansible_ssh_port: 5986
#local port
#ansible_ssh_port: 55985
ansible_connection: winrm

Detailed usage guide

Run the following command :

ansible-playbook -i hosts -c local -v windows.yml -vvvv --ask-sudo-pass | tee setup.log

Testing

$ ansible-galaxy install alban.andrieu.windows
$ vagrant up

Contributing

The issue tracker is the preferred channel for bug reports, features requests and submitting pull requests.

For pull requests, editor preferences are available in the editor config for easy use in common text editors. Read more and download plugins at http://editorconfig.org.

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests and examples for any new or changed functionality.

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Authors and license

roles/alban_andrieu_windows role was written by:

License

Feedback, bug-reports, requests, ...

Are welcome!


This role is part of the Nabla project. README generated by Ansigenome.


Alban Andrieu

linkedin

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.