From 0d9e7dedee79517e059d05ddd0681c7f2db2d938 Mon Sep 17 00:00:00 2001 From: Alban Andrieu Date: Thu, 11 Feb 2016 04:22:37 -0600 Subject: [PATCH] Add callback --- .travis.yml | 16 +- ansible.cfg | 5 + callback_plugins/fix-ssl.py | 8 + callback_plugins/fix-ssl.pyc | 467 +++++++++++++++++++++++++++++++++++ 4 files changed, 493 insertions(+), 3 deletions(-) create mode 100644 ansible.cfg create mode 100644 callback_plugins/fix-ssl.py create mode 100644 callback_plugins/fix-ssl.pyc diff --git a/.travis.yml b/.travis.yml index 7c53b11..99e0d79 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,12 @@ --- language: python python: "2.7" +env: + - ANSIBLE_VERSION=1.9.2 +cache: bundler +#sudo: false +sudo: required +dist: trusty before_install: - sudo apt-get update -qq - sudo apt-get install -qq python-apt python-pycurl @@ -10,11 +16,15 @@ before_install: - wget https://dl.bintray.com/mitchellh/vagrant/vagrant_1.6.3_x86_64.deb - sudo dpkg -i vagrant_1.6.3_x86_64.deb install: -# - sudo pip install --no-use-wheel https://github.com/ansible/ansible/archive/devel.zip - - sudo pip install ansible + # Install Ansible. + - sudo pip install ansible==$ANSIBLE_VERSION + + # Add ansible.cfg to pick up roles path. + #- "{ echo '[defaults]'; echo 'roles_path = ../'; } >> ansible.cfg" + - sudo pip install https://github.com/diyan/pywinrm/archive/df049454a9309280866e0156805ccda12d71c93a.zip --upgrade script: - - ansible --version + - sudo ansible --version - export ANSIBLE_ROLES_PATH="../" - echo localhost > inventory - vagrant --version diff --git a/ansible.cfg b/ansible.cfg new file mode 100644 index 0000000..331e5a8 --- /dev/null +++ b/ansible.cfg @@ -0,0 +1,5 @@ +; needed to bypass self-signed certificates on windows +[defaults] +bin_ansible_callbacks=True +callback_plugins = ./callback_plugins +library = ./library diff --git a/callback_plugins/fix-ssl.py b/callback_plugins/fix-ssl.py new file mode 100644 index 0000000..f8844d0 --- /dev/null +++ b/callback_plugins/fix-ssl.py @@ -0,0 +1,8 @@ +import ssl +if hasattr(ssl, '_create_default_https_context') and hasattr(ssl, '_create_unverified_context'): + ssl._create_default_https_context = ssl._create_unverified_context + +class CallbackModule(object): + pass + +# needed to bypass self-signed certificates for winrm diff --git a/callback_plugins/fix-ssl.pyc b/callback_plugins/fix-ssl.pyc new file mode 100644 index 0000000..2f98f11 --- /dev/null +++ b/callback_plugins/fix-ssl.pyc @@ -0,0 +1,467 @@ + + + + + + + + + + + + + + vagrant-box-templates/fix-ssl.pyc at master · mrlesmithjr/vagrant-box-templates · GitHub + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Skip to content + + + + + + + + + + + + +
+ +
+
+ + +
+
+
+ + + +
+
+ + + + + + + +
+ +
+ + + +
+ +
+ + Find file + + +
+ +
+ + +
+ + + cbd6450 + + + + + + + + +
+ +
+
+
+ +
+ Raw + History +
+ + +
+ +
+ +
+ 565 Bytes +
+
+ + + +
+
+ View Raw +
+
+ +
+ +Jump to Line + + +
+ +
+ +
+
+ +
+ +
+ +
+ + + + + + + +
+ + + Something went wrong with that request. Please try again. +
+ + + + + + + + + + +