Managing windows hosts with Ansible. "winrm or requests is not installed." - powershell

I'm currently setting up Ansible on CentOS7 and I need to use it to manage some Windows machines.
I was following these two guides (1 & 2) to get this set up.
When running the command ansible host_group -i hosts -m win_ping
I get back an error saying:
x.x.x.x | FAILED! => {"msg": "winrm or requests is not installed: No module named xmltodict"}
I checked my installed python modules and I have both winrm and requests
I'm not sure what I'm missing here. There was a post I found on the RedHat forums outlining the same problem https://access.redhat.com/solutions/335668
Thanks for your time
EDIT: I also have xmltodict installed.

You sure you have then install in the right version of python 2 vs python 3? Had similar issues before, installing with both pip and pip3 fixed it.

Related

Cannot install QuickCheck for Haskell: "runInteractiveProcess: permission denied"

When I run the commands
cabal update
cabal install QuickCheck
on windows powershell, or
cabal install --lib --package-env . QuickCheck
I get runInteractiveProcess: permission denied. I have found that I need to run "/scripts/securetmp" and un-secure my /tmp. How do I do that? What does it mean to run /scripts/securetmp?
I was asked for the link to the advice, here are 2 links from 2 different people who said the same:
1.In one of the answers on a similar question on StackOverflow:
Can't install and use Cabal (Haskell) on CentOS Server - zlib-0.5.4.1 failed during the building phase
2.On a website, though it's in Russian, but says the same thing:
https://coderoad.ru/24461456/%D0%9D%D0%B5-%D1%83%D0%B4%D0%B0%D0%B5%D1%82%D1%81%D1%8F-%D1%83%D1%81%D1%82%D0%B0%D0%BD%D0%BE%D0%B2%D0%B8%D1%82%D1%8C-%D0%B8-%D0%B8%D1%81%D0%BF%D0%BE%D0%BB%D1%8C%D0%B7%D0%BE%D0%B2%D0%B0%D1%82%D1%8C-Cabal-Haskell-%D0%BD%D0%B0-%D1%81%D0%B5%D1%80%D0%B2%D0%B5%D1%80%D0%B5-CentOS-%D0%BE%D1%88%D0%B8%D0%B1%D0%BA%D0%B0
On both those links there are other answers, that talk about running some bootstrap.sh script. That might be another solution, but I don't understand how to do it.
Try to install it using :cabal --http-transport=plain-http install QuickCheck, with this you will be forcing cabal not to use powershell's webclient, it worked for me.

Does coc.nvim require Python?

The installation instructions don't mention the need for Python or specific Python plugins. Although when I add coc.nvim to my vim plugs (Plug 'neoclide/coc.nvim', {'branch': 'release'}), install and restart Neovim, I get the following error:
[coc.nvim] Error on execute python script: request error nvim_command - Vim(pyxfile):E319: No "python3" provider found. Run ":checkhealth provider"
I'm a long time VIM/Neovim user and have my fair share of plugins installed, none of them has any dependency on 3rd party Python scripts, and I would like to keep it that way.
So my question is, does coc.nvim require Python or is there something misconfigured on my end?
You're using https://github.com/neoclide/coc-snippets , which will load and parse Ultisnips snippets, some snippets need Python to run.
You can disable Python by setting "snippets.ultisnips.usePythonx": false in your coc-settings.json.
I solved it using "snippets.ultisnips.usePythonx": false and running pip install neovim in my virtual environment.
I solved it by pip3 install --user pynvim

Need to Install Concourse(CI/CD) on windows system

I need to install Concourse(CI/CD) on my Local windows machine
Below process I followed :
Install Bosh on local system.
It was successfully install and while executing command at command prompt
then it show version all "bosh" -- "version 3.0.1-712bfd7-2018-03-13T23:26:43Z".
Try Download the concourse-lite deployment manifest file but it fails it shows below error.
Follow the below link to install Concourse :
https://concoursetutorial.com/ --- section For Windows:
I don't reccomend doing this at all because you'll be swimming so far out of the main stream that you'll find tons of issues and no one is going to care enough to want to fix them.
Even if you didn't find any issues, resources require a linux worker for anything to work so your going to need linux anyways.
I recommend running your db, web and linux worker on linux and then running windows workers as needed.

Memcache extension with PHP 7 on CentOS fails to install

I'm trying to upgrade a fairly large PHP 5.3 code base to PHP 7. It's hosted on CentOS 6.5, so I want to keep it on that OS. I'm currently doing it on a virgin Vagrant box - I've installed PHP 7 successfully, and all the modules except for Memcache.
As root, when I run pecl install memcache it tries to install v2.2.7 but I get a long list of errors and warnings from make. At the end is:
make: *** [memcache.lo] Error 1
ERROR: `make' failed
According to GoPHP7 it should work, Memcache should work with PHP 7 - it says "php7 port on github". There is indeed a Memcache PHP 7 port on GitHub. When I look at the Memcache page on Pecl page, it shows that I should be installing v3.0.8, but this in beta (and has been since 2013).
So I try to run pecl install memcache-3.0.8 and it still fails, with the same error as above:
make: *** [memcache.lo] Error 1
ERROR: `make' failed
So is it possible to get the Memcache extension working with PHP 7 on CentOS 6.5?
If you haven't solved this yet, I have a solution that worked for me. I'm on CentOS 7.x but it should still work for you, and anyone else wanting to use pecl-memcache with PHP 7 (not pecl-memcached as that's a completely different package).
As you have already discovered, you must use the Memcache PHP 7 port on GitHub for this.
Login to your shell and perform the following:
1. wget https://github.com/websupport-sk/pecl-memcache/archive/NON_BLOCKING_IO_php7.zip
2. unzip NON_BLOCKING_IO_php7.zip
3. cd pecl-memcache-NON_BLOCKING_IO_php7
4. /opt/cpanel/ea-php70/root/usr/bin/phpize && ./configure --enable-memcache --with-php-config=/opt/cpanel/ea-php70/root/usr/bin/php-config && make
5. cp modules/memcache.so /opt/cpanel/ea-php70/root/usr/lib64/php/modules/
6. echo 'extension=memcache.so' >/opt/cpanel/ea-php70/root/etc/php.d/memcached.ini
7. service httpd restart
Some notes for the above:
Replace each full path that I've used with the appropriate full path on your own system. While I have /opt/cpanel/ea-php70/root/, you may have /opt/php-7.0.7/. If you have multiple PHP versions installed, as I do, running phpize may end up building using an old version of PHP. I discovered this after much trial and error.
To find out where your PHP modules folder is, you can run "/opt/cpanel/ea-php70/root/usr/bin/php -i | grep extension_dir"
You may not need to perform step 6 where I am creating a memcached.ini if you already have it loaded elsewhere.
You can verify if it was correctly built and installed using "/opt/cpanel/ea-php70/root/usr/bin/php -i | grep memcache". If you see various memcache entries, everything was installed successfully.
I hope that helps!

The DSC provisioner could not be found

I am trying to build a local development environment with vagrant, Packer And DSC.
And I have an error saying that DSC is not found, from my understanding DSC come with Powershell 4.0 and I checked the version I have it is 5.0 (I tried to install with INSTALL-MODULE and nothing change)
I am following this blog post : http://www.onegeek.com.au/articles/machine-factories-part1-vagrant
Running in windows 10
And here is the vagrant file I use https://gist.github.com/mefellows/7e25d5dba254d5d38b51#file-vagrantfile
The error message is :
You will need to install the Vagrant DSC plugin first:
vagrant plugin install vagrant-dsc
See https://github.com/mefellows/vagrant-dsc for more details.
I have updated the gist from that article, apologies for that omission.