An SSH Python automation tool for quickly getting things done
Project description
Public Server Automator
V1.0.1
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
from publicServerAutomator import Server
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(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
from publicServerAutomator import Server
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(inputServerIP='8.8.8.8',inputUserName='root', inputPassword='123lookatme', inputKeyPath='')
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
Close
Hashes for publicServerAutomator-1.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb99c9d1967090eb479fa2ac4408086ef5e9e31c45fdfd0e39f2d5352e846a32 |
|
MD5 | dad30075167c4ce630ad59951481735c |
|
BLAKE2b-256 | cebd8d7252d52fe7ce21ea5336c5eb4992e1beb72a74e41db0d860d70847a1ec |