An SSH Python automation tool for quickly getting things done
Project description
Public Server Automator
V1.0.0
Purpose
This is a package intended to offer a much simpler, no hickups, no learning curve package + software alternative to Ansible/chef/puppet
Installation
Install via pip
pip install publicServerAutomator
Usage
When using a private key
import Server from publicServerAutomator
dockerInstructions = [
"apt-get update -y",
"apt-get install apt-transport-https -y",
"apt-get install software-properties-common -y",
"apt-get install curl -y",
"apt-get install gnupg2 -y",
"apt-get install git -y",
"apt-get install acl -y",
"apt-get install fail2ban -y"
'''add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"''',
"apt-get update -y",
"apt-get install docker-ce -y",
"docker run hello-world"
]
newDocker = server.Server(inputKeyPath="publickey.pem", inputKeyPassword='PASS', inputServerIP="0.0.0.0" )
newDocker.set_commands(commandList=dockerInstructions)
newDocker.connect()
newDocker.run_commands()
Without using a private key
import Server from publicServerAutomator
dockerInstructions = [
"apt-get update -y",
"apt-get install apt-transport-https -y",
"apt-get install software-properties-common -y",
"apt-get install curl -y",
"apt-get install gnupg2 -y",
"apt-get install git -y",
"apt-get install acl -y",
"apt-get install fail2ban -y"
'''add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"''',
"apt-get update -y",
"apt-get install docker-ce -y",
"docker run hello-world"
]
newDocker = server.Server(inputServerIP='8.8.8.8',inputUserName='root', inputPassword='123lookatme')
newDocker.set_commands(commandList=dockerInstructions)
newDocker.connect()
newDocker.run_commands()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for publicServerAutomator-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2fa39410beedc921936225689e0514fc13ce9c1155541229c5fe23d1721c1219 |
|
MD5 | 5cd03d4af7541efebb1f4237601f5e86 |
|
BLAKE2b-256 | 1cfb13ca463d45be8f6b780fd83d539b3cbfe30c33295f50716e863e131e9659 |
Close
Hashes for publicServerAutomator-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c2048f696d0cebb7bc697665be449f069f7f68e5adcd2da44e6ca34092fa8bb |
|
MD5 | 679fce3545404152a042110e32a47cd4 |
|
BLAKE2b-256 | 3c8e5fcaa6c0aa90dc79d3d3863aaabe23cd090e048340595f14168c333a2e73 |