<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def tweak(environment, opts):
 """Commands operating on environment data Usage: datacats tweak --install-postgis [ENVIRONMENT] datacats tweak --add-redis [ENVIRONMENT] datacats tweak --admin-password [ENVIRONMENT] Options: --install-postgis Install postgis in ckan database --add-redis Adds redis next time this environment reloads -s --site=NAME Choose a site to tweak [default: primary] -p --admin-password Prompt to change the admin password ENVIRONMENT may be an environment name or a path to an environment directory. Default: '.' """


    environment.require_data()
    if opts['--install-postgis']:
        print "Installing postgis"
        environment.install_postgis_sql()
    if opts['--add-redis']:
        # Let the user know if they are trying to add it and it is already there
        print ('Adding redis extra container... Please note that you will have '
            'to reload your environment for these changes to take effect ("datacats reload {}")'
            .format(environment.name))
        environment.add_extra_container('redis', error_on_exists=True)
    if opts['--admin-password']:
        environment.create_admin_set_password(confirm_password())