Exemplo n.º 1
0
#!/usr/bin/env python3
from chibi.command import yum, systemctl, command
from chibi.command.echo import cowsay
from chibi.file import Chibi_file
from chibi.file.snippets import inflate_dir

file_check_path = inflate_dir('~/provision_installed')
file_check = Chibi_file(file_check_path)

version_to_check = "redis\n".format(file=__file__, )

if __name__ == "__main__" and not version_to_check in file_check:
    cowsay("instalado redis")

    yum.install('redis')
    systemctl.start("redis")
    systemctl.enable("redis")

    cowsay("termino de instalar redis")

    result, error, return_code = command('redis-cli', 'ping', stdout='pipe')

    cowsay("redis ping say: {}".format(result))

    file_check.append(version_to_check)
Exemplo n.º 2
0
#!/usr/bin/env python3
from chibi.command import yum
from chibi.command.echo import cowsay
from chibi.file.snippets import inflate_dir
from chibi.file import Chibi_file


file_check_path = inflate_dir( '~/provision_installed' )
file_check = Chibi_file( file_check_path )


version_to_check = "essential 1\n".format( file=__file__, )


if __name__ == "__main__" and not version_to_check in file_check:
    cowsay( "Starting install for essential" )
    yum.install(
        'bash-completion', 'bash-completion-extras', 'texinfo',  'vim',
        'ruby', 'git', 'kernel-headers', 'kernel-devel', 'htop' )

    file_check.append( version_to_check )
    cowsay( "Ending install for essential" )
Exemplo n.º 3
0
#!/usr/bin/env python3

import sys
from datetime import datetime

from chibi.file import Chibi_file, Chibi_path


path = Chibi_path( __file__ )

f = Chibi_file( ( path + "wpa_cli" ) + "wpa_cli" )
date = datetime.utcnow()

event = ",".join( sys.argv[1:] )

final_even = "{}\t{}\n".format( date.isoformat(), event )

f.append( final_even )