From 05cb4ceb4889709359fbe33e790eb49865b467e5 Mon Sep 17 00:00:00 2001 From: Tanguy Herbron Date: Sat, 11 Jun 2022 02:31:29 +0200 Subject: [PATCH] Remove legacy scripts and tasks --- setup/inventory_builder.py | 25 ------------------------- setup/inventory_builder.sh | 3 --- setup/testing.yml | 5 ----- setup/user_setup.yml | 14 -------------- 4 files changed, 47 deletions(-) delete mode 100644 setup/inventory_builder.py delete mode 100644 setup/inventory_builder.sh delete mode 100644 setup/testing.yml delete mode 100644 setup/user_setup.yml diff --git a/setup/inventory_builder.py b/setup/inventory_builder.py deleted file mode 100644 index 908b231..0000000 --- a/setup/inventory_builder.py +++ /dev/null @@ -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() diff --git a/setup/inventory_builder.sh b/setup/inventory_builder.sh deleted file mode 100644 index eb7663b..0000000 --- a/setup/inventory_builder.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -echo "" diff --git a/setup/testing.yml b/setup/testing.yml deleted file mode 100644 index 778e5a1..0000000 --- a/setup/testing.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -- name: Testing tasks - hosts: all - tasks: - - debug: var=ansible_all_ipv4_addresses diff --git a/setup/user_setup.yml b/setup/user_setup.yml deleted file mode 100644 index 867b1b2..0000000 --- a/setup/user_setup.yml +++ /dev/null @@ -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