Failling to install IIS on Windows 10 from Ansible [closed] - windows

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
Hey guys I am kind of new to Ansible, and I am currently trying to run a playbook that will install IIS.
I've already configure everything and got a message success when I try to ping to the host server (Windows 10 pro - host server)
I am running the playbook through my local computer with WSL (Windows subsystem linux) also a Windows 10 pro.
The script I am trying to run is:
---
- name: Install IIS
hosts: win
gather_facts: true
tasks:
- win_feature:
name: "Web-Server"
state: present
restart: yes
include_sub_features: yes
include_management_tools: yes
but I keep getting this error :
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: at <ScriptBlock>, <No file>: line 8
fatal: [MY IP SERVER-censored]: FAILED! => {"changed": false, "msg": "Unhandled exception while executing module: The specified module 'ServerManager' was not loaded because no valid module file was found in any module directory."}
I have also tried to install Server manager to maybe trying to fix the problem but it didnt help to be honest.
As I said I am new to Ansible and still on learning terms.
I will appreciate any kind of help.
Thank you.

The Ansible module "win_feature" only works on Windows servers.
The documentation (https://docs.ansible.com/ansible/latest/collections/ansible/windows/win_feature_module.html) states: "This module uses the Add/Remove-WindowsFeature Cmdlets on Windows 2008 R2 and Install/Uninstall-WindowsFeature Cmdlets on Windows 2012, which are not available on client os machines."

Related

docker run hello-world:nanoserver works first time, fails on second. Error during CreateContainer [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 years ago.
Improve this question
I am trying to run my own images on a CI server but since Friday (28sep) I am getting this specific error.
Full output:
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
(windows-amd64, nanoserver-sac2016)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
To try something more ambitious, you can run a Windows Server container with:
PS C:> docker run -it microsoft/windowsservercore powershell
Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/get-started/
PS C:\Windows\system32> docker run hello-world:nanoserver
C:\Program Files\Docker\docker.exe: Error response from daemon:
container b2dc21afcda3361203bbb79720a1d0280ba021ca3a2c0d
3becd9a027cf134f53 encountered an error during CreateContainer: failure in a Windows system call: The system cannot find
the file specified. (0x2) extra info: {"SystemType":"Container","Name":"b2dc21afcda3361203bbb79720a1d0280ba021ca3a2c0d3
becd9a027cf134f53","Owner":"docker","IsDummy":false,"VolumePath":"\\?\Volume{bbab560c-c614-11e8-a95b-000d3a20649b}","
IgnoreFlushesDuringBoot":true,"LayerFolderPath":"C:\ProgramData\Docker\windowsfilter\b2dc21afcda3361203bbb79720a1d02
80ba021ca3a2c0d3becd9a027cf134f53","Layers":[{"ID":"656d46da-bdc1-5d72-8f3a-a6e50317dafe","Path":"C:\ProgramData\Docke
r\windowsfilter\5205df1614c923e130789b863fc95e4d92440d59938e96e2e9ed44e1cebab886"},{"ID":"db583ee6-7c19-5007-b3ef-5dde
b2d1b4f9","Path":"C:\ProgramData\Docker\windowsfilter\34265544721cea100b70092e919ecd5bd051f37a7db2dd45173181a906766a
fd"},{"ID":"29f9eeb8-a6fa-5f8d-b707-a21b01ca0d35","Path":"C:\ProgramData\Docker\windowsfilter\70d4b5f556022aaa0839b8
43d92163e42bf9cd9289cab9d44dfa4592f5821edd"},{"ID":"1850616a-b5da-5f5b-879b-ccdeafe72cbc","Path":"C:\ProgramData\Docke
r\windowsfilter\7398caef54f51ca819d903680046500c61ae1f6e975adb65a3dd0c4149d8842f"}],"HostName":"b2dc21afcda3","MappedD
irectories":[],"HvPartition":false,"EndpointList":["79235e65-7782-4485-9a7c-d66b91eae1ff"],"Servicing":false,"AllowUnqua
lifiedDNSQuery":true}.
PS C:\Windows\system32>
Run
docker run -it hello-world:nanoserver-sac2016
I identified the problem to come from Trend Micro anti virus.
I was not enough to just deactivate the program, it had to be uninstalled.
All works now.
Thanks everyone

Fedora 23 passwordless ssh key not working in automated host addition [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I have installed Fedora 23 and have tried to do a passwordless login with:
# ssh-copy-id ~/.ssh/id_dsa.pub user#host
which successfully copies the key to the host machine and I have checked in the host machine in:
# tail -n10 ~/.ssh/authorized_keys
and my PC name exists as the last line but when trying to login:
# ssh user#host
I am asked for a password! I have tried to login to Ubuntu and CentOS and get the same result. I have done this previously with multiple linux distros including Fedora 21, CentOS and Ubuntu and it works just fine.
I need this to do finish the automated host addition script which adds a host and then logs in automatically (add_user_host):
#!/bin/bash
ssh-copy-id ~/.ssh/id_dsa.pub $1#$2;
ssh $1#$2;
all you would do is run:
# add_user_host user host
Openssh-7.0 obsoleted DSA keys. To use them you need to specify PubkeyAcceptedKeyTypes +ssh-dss in your ssh_config (as mentioned in your linked thread) to make them working, or rather use other keys (RSA, ed25519).
This case has also its page on official webseite and part in release notes.

Using semanage in CentOS 6.6 (Virtual Machine) but it shows “Killed” [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I have a CentOS 6.6 virtual machine (lauched in Eucalyptus Private Cloud). I guess Amazon Instance may have this problem too(https://www.centos.org/forums/viewtopic.php?f=51&t=51976). I am trying to add port250 to ssh and port 12345 to http_port_t. But I get following errors:
[root#ip-172-16-1-163 ~]# semanage port -a -t http_port_t -p tcp 12345
Killed
[root#ip-172-16-1-163 ~]# semanage port -a -t ssh_port_t -p tcp 250
Killed
The selinux is permissive in the virtual machine.
The output is very abnormal. I am wondering what caused this and how to debug error?
Update:
Just found this is because of out of memory. Virtual machine will kill the most long-running command (https://serverfault.com/questions/268288/most-long-running-commands-instantly-killed-on-amazon-ec2-ubuntu-10-04):
Out of memory: Kill process 16315 (semanage) score 649 or sacrifice child
Killed process 16315, UID 0, (semanage) total-vm:347604kB, anon-rss:165468kB, file-rss:4kB
Update:
Just found this is because of out of memory. Virtual machine will kill the most long-running command (https://serverfault.com/questions/268288/most-long-running-commands-instantly-killed-on-amazon-ec2-ubuntu-10-04):
Using the dmesg command could track the cause to kill the process:
Out of memory: Kill process 16315 (semanage) score 649 or sacrifice child Killed
process 16315, UID 0, (semanage) total-vm:347604kB, anon-rss:165468kB, file-rss:4kB
Update again:
I used the t1.micro as the instance type and it does't have much memory. So the semanage failed. Now I changed to use big memory type and it works now.

Redis start as service [unrecognized service error] [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I install redis on Ubuntu 14.04. I want to start redis as service. but I can't do that.
firstly , I cant start and stop redis server by using following commands:
sudo /etc/init.d/redis-server start
sudo /etc/init.d/redis-server stop
But I try following command to start as service , I get "redis-service: unrecognized service"
sudo service redis-service start
I wait your helps, thanks
If you've used the defaults, your Redis service is actually named redis_6379 - try the following:
sudo service redis_6379 start
try: sudo service redis-server start
I think,to configure redis as service,you need to execute below line.
sudo update-rc.d redis-server defaults
in your shell, use this command: redis-cli shutdown
or
into folder src use: ./redis-server

How can I copy a file from a remote server to using Putty in Windows? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
How do I copy a file from a remote server to my local Windows system using a Putty session?
It worked using PSCP.
Instructions:
Download PSCP.EXE from Putty download page
Open command prompt and type set PATH=<path to the pscp.exe file>
In command prompt point to the location of the pscp.exe using cd command
Type pscp
use the following command to copy file form remote server to the local system
pscp [options] [user#]host:source target
So to copy the file /etc/hosts from the server example.com as user fred to the file
c:\temp\example-hosts.txt, you would type:
pscp fred#example.com:/etc/hosts c:\temp\example-hosts.txt
One of the putty tools is pscp.exe; it will allow you to copy files from your remote host.

Resources