set PATH=%PATH%;C:\Program Files (x86)\Python38-32\Scripts
Thursday, 9 January 2020
ERROR : he scripts pip.exe, pip3.8.exe and pip3.exe are installed in 'C:\Program Files (x86)\Python38-32\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
set PATH=%PATH%;C:\Program Files (x86)\Python38-32\Scripts
Monday, 6 January 2020
python script to copy a executable file from source machine to target and execute the same file on target machine
import paramiko
import os, time, subprocess
port = "22"
username = ""
password = ""
f = open("hosts.txt", "r")
for ip in f:
print(ip)
#print(ip.strip())
cmd = "sshpass -p '' scp -r /home/raghuvel.sekar/deployAgentbkp.py root@{}:/home/raghuvel.sekar".format(ip.strip())
#print (cmd)
jobout= subprocess.check_output(cmd, shell=True)
time.sleep(10)
#print (jobout)
ssh=paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.connect(ip,port,username,password)
stdin,stdout,stderr=ssh.exec_command('(cd /home/raghuvel.sekar; python test.py)')
time.sleep(10)
outlines=stdout.readlines()
resp =''.join(outlines)
print("done")
Thursday, 2 January 2020
Passing windows path as EXTRA VARS in ansible
ansible-playbook test2.yml -e user=administrator -e 'item_path=C:\\Users\\Administrator\\Desktop\\test\\sample.txt' -e type=allow -e rights=FullControl -vvvv
Monday, 2 December 2019
Wednesday, 20 November 2019
Tuesday, 19 November 2019
continue executing the ansible playbook even if some of the tasks fail
ignore_errors: yes will continue executing the playbook even if some of the tasks fail
Subscribe to:
Comments (Atom)
Git
1 git add ↳ It lets you add changes from the working directory into the staging area 2 git commit ↳ It lets you save a snapshot of currently...
-
https://github.com/crossplane-contrib
-
https://docs.aws.amazon.com/eks/latest/userguide/create-cluster.html
-
awk '{u=$2+$4; t=$2+$4+$5; if (NR==1){u1=u; t1=t;} else print ($2+$4-u1) * 100 / (t-t1) "%"; }' \ <(grep 'cpu ...