Remove legacy scripts and tasks
This commit is contained in:
parent
bdc1667dcb
commit
05cb4ceb48
@ -1,25 +0,0 @@
|
|||||||
from paramiko import SSHClient,AutoAddPolicy
|
|
||||||
from getpass import getpass
|
|
||||||
|
|
||||||
address = input("Machine address: ")
|
|
||||||
username = input("SSH user: ")
|
|
||||||
password = getpass()
|
|
||||||
|
|
||||||
print("Connecting to", address, "as", username, "...")
|
|
||||||
client = SSHClient()
|
|
||||||
client.set_missing_host_key_policy(AutoAddPolicy())
|
|
||||||
|
|
||||||
client.connect(address, username=username, password=password)
|
|
||||||
stdin, stdout, stderr = client.exec_command("su")
|
|
||||||
stdin.write(password + '\n')
|
|
||||||
stdin.write("touch /home/tanguy/testing\n")
|
|
||||||
stdin.write("exit\n")
|
|
||||||
stdin.flush()
|
|
||||||
print("Return", stdout.read().decode("utf8"))
|
|
||||||
|
|
||||||
ret = stdout.channel.recv_exit_status()
|
|
||||||
|
|
||||||
stdin.close()
|
|
||||||
stdout.close()
|
|
||||||
stderr.close()
|
|
||||||
client.close()
|
|
@ -1,3 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
echo ""
|
|
@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Testing tasks
|
|
||||||
hosts: all
|
|
||||||
tasks:
|
|
||||||
- debug: var=ansible_all_ipv4_addresses
|
|
@ -1,14 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Setup ansible configuration for new host
|
|
||||||
hosts: all
|
|
||||||
tasks:
|
|
||||||
- name: Add 'ansible' system user and setup SSH key
|
|
||||||
become: yes
|
|
||||||
user:
|
|
||||||
name: ansible
|
|
||||||
comment: Automation user for ansible
|
|
||||||
system: True
|
|
||||||
create_home: False
|
|
||||||
generate_ssh_key: yes
|
|
||||||
ssh_key_bits: 4096
|
|
||||||
ssh_key_file: /etc/ansible/.id_rsa
|
|
Loading…
Reference in New Issue
Block a user