Skip to main content

An SSH Python automation tool for quickly getting things done

Project description

Public Server Automator

V1.0.0

PublicServerAutomator Github

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

publicServerAutomator-0.0.1.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

publicServerAutomator-0.0.1-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file publicServerAutomator-0.0.1.tar.gz.

File metadata

  • Download URL: publicServerAutomator-0.0.1.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.19.1 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/2.7.15

File hashes

Hashes for publicServerAutomator-0.0.1.tar.gz
Algorithm Hash digest
SHA256 2fa39410beedc921936225689e0514fc13ce9c1155541229c5fe23d1721c1219
MD5 5cd03d4af7541efebb1f4237601f5e86
BLAKE2b-256 1cfb13ca463d45be8f6b780fd83d539b3cbfe30c33295f50716e863e131e9659

See more details on using hashes here.

File details

Details for the file publicServerAutomator-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: publicServerAutomator-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.19.1 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/2.7.15

File hashes

Hashes for publicServerAutomator-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2c2048f696d0cebb7bc697665be449f069f7f68e5adcd2da44e6ca34092fa8bb
MD5 679fce3545404152a042110e32a47cd4
BLAKE2b-256 3c8e5fcaa6c0aa90dc79d3d3863aaabe23cd090e048340595f14168c333a2e73

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page