Minor work started for three-tier-app
readme updates
tested ocp-clientvm and three-tier-app
1 files deleted
46 files modified
129 files renamed
| | |
| | | = OCP Client VM (ocp-clientvm) Standard Config |
| | | |
| | | == Set up your "Secret" variables |
| | | |
| | | * You need to provide some credentials for deployments to work |
| | | * Create a file called "env_secret_vars.yml" and put it in the ./ansible/configs/CONFIGNAME/ directory. |
| | | ** At this point this file *has to be created* even if no vars from it are used. |
| | | * You can choose to provide these values as extra vars (-e "var=value") in the command line if you prefer not to keep sensitive information in a file. |
| | | |
| | | .Example contents of "Secret" Vars file |
| | | ---- |
| | | # ## Logon credentials for Red Hat Network |
| | | # ## Required if using the subscription component |
| | | # ## of this playbook. |
| | | rhel_subscription_user: '' |
| | | rhel_subscription_pass: '' |
| | | # |
| | | # ## AWS Credentials. This is required. |
| | | aws_access_key_id: "" |
| | | aws_secret_access_key: "" |
| | | # |
| | | #If using repo_method: satellite, you must set these values as well. |
| | | satellite_url: https://satellite.example.com |
| | | satellite_org: Sat_org_name |
| | | satellite_activationkey: "rhel7basic" |
| | | ---- |
| | | |
| | | == Review the Env_Type variable file |
| | | |
| | | * This file link:./env_vars.yml[./env_vars.yml] contains all the variables you need to define to control the deployment of your environment. |
| | | |
| | | |
| | | === IPA registration |
| | | |
| | | You can either provide `ipa_host_password` or a couple `ipa_kerberos_user`/`ipa_kerberos_password` to register the host to the ipa server. See link:../../roles/bastion-opentlc-ipa[roles/bastion-opentlc-ipa]. |
| | | = OCP Client VM (ocp-clientvm) |
| | | |
| | | == Running Ansible Playbook |
| | | |
| | |
| | | |
| | | [source,bash] |
| | | ---- |
| | | GUID=testclientvm1 |
| | | REGION=us-east-1 |
| | | GUID=sborenstest5 |
| | | REGION=ap-southeast-2 |
| | | KEYNAME=ocpkey |
| | | ENVTYPE="ocp-clientvm" |
| | | CLOUDPROVIDER=ec2 |
| | | HOSTZONEID='Z186MFNM7DX4NF' |
| | | REPO_PATH='https://admin.example.com/repos/ocp/3.9.14/' |
| | | HOSTZONEID='Z3IHLWJZOU9SRT' |
| | | BASESUFFIX='.example.opentlc.com' |
| | | REPO_VERSION=3.9 |
| | | DEPLOYER_REPO_PATH=`pwd` |
| | | OSRELEASE=3.9.14 |
| | | REPO_VERSION=3.11 |
| | | OSRELEASE=3.11.16 |
| | | |
| | | ansible-playbook main.yml \ |
| | | ansible-playbook ansible/main.yml \ |
| | | -e "guid=${GUID}" \ |
| | | -e "env_type=${ENVTYPE}" \ |
| | | -e "osrelease=${OSRELEASE}" \ |
| | | -e "repo_version=${REPO_VERSION}" \ |
| | | -e "docker_version=1.13.1" \ |
| | | -e "cloud_provider=${CLOUDPROVIDER}" |
| | | -e "cloud_provider=${CLOUDPROVIDER}" \ |
| | | -e "aws_region=${REGION}" \ |
| | | -e "HostedZoneId=${HOSTZONEID}" \ |
| | | -e "key_name=${KEYNAME}" \ |
| | | -e "subdomain_base_suffix=${BASESUFFIX}" \ |
| | | -e "clientvm_instance_type=t2.large" \ |
| | | -e "email=name@example.com" \ |
| | | -e "software_to_deploy=none" \ |
| | | -e "ANSIBLE_REPO_PATH=${DEPLOYER_REPO_PATH}" \ |
| | | -e "own_repo_path=${REPO_PATH}" |
| | | -e "email=name@example.com" -e"output_dir=/opt/workdir" -e"output_dir=/opt/workdir" -e@../secret.yml -vvvv |
| | | ---- |
| | | |
| | | === Satellite version |
| | |
| | | -e "clientvm_instance_type=t2.large" |
| | | -e "subdomain_base_suffix=.example.opentlc.com" |
| | | ) |
| | | ---- |
| | | ---- |
| | |
| | | = generic-example config |
| | | |
| | | == Set up your "Secret" variables |
| | | |
| | | * You need to provide some credentials for deployments to work |
| | | * Create a file called "env_secret_vars.yml" and put it in the |
| | | ./ansible/configs/CONFIGNAME/ directory. |
| | | ** At this point this file *has to be created* even if no vars from it are used. |
| | | * You can choose to provide these values as extra vars (-e "var=value") in the |
| | | command line if you prefer not to keep sensitive information in a file. |
| | | |
| | | .Example contents of "Secret" Vars file |
| | | ---- |
| | | # ## Logon credentials for Red Hat Network |
| | | # ## Required if using the subscription component |
| | | # ## of this playbook. |
| | | rhel_subscription_user: '' |
| | | rhel_subscription_pass: '' |
| | | # |
| | | # ## LDAP Bind Password |
| | | bindPassword: '' |
| | | # |
| | | # ## Desired admin name and password if required |
| | | admin_user: "" |
| | | admin_user_password: "" |
| | | # |
| | | # ## AWS Credentials. This is required. |
| | | aws_access_key_id: "" |
| | | aws_secret_access_key: "" |
| | | #If using repo_method: satellite, you must set these values as well. |
| | | satellite_url: https://satellite.example.com |
| | | satellite_org: Sat_org_name |
| | | satellite_activationkey: "rhel7basic" |
| | | |
| | | ---- |
| | | = Three Tier App |
| | | |
| | | == Review the Env_Type variable file |
| | | |
| | |
| | | ---- |
| | | REGION=ap-southeast-2 |
| | | KEYNAME=ocpkey |
| | | GUID=tonyshatest1 |
| | | GUID=praktest2 |
| | | ENVTYPE="three-tier-app" |
| | | CLOUDPROVIDER=ec2 |
| | | HOSTZONEID='Z3IHLWJZOU9SRT' |
| | | REPO_PATH='https://admin.example.com/repos/ocp/3.6/' |
| | | |
| | | BASESUFFIX='.example.opentlc.com' |
| | | DEPLOYER_REPO_PATH=`pwd` |
| | | |
| | | ansible-playbook \ |
| | | ${DEPLOYER_REPO_PATH}/main.yml \ |
| | | -e "ANSIBLE_REPO_PATH=${DEPLOYER_REPO_PATH}" \ |
| | | ansible/main.yml \ |
| | | -e "guid=${GUID}" \ |
| | | -e "env_type=${ENVTYPE}" \ |
| | | -e "key_name=${KEYNAME}" \ |
| | |
| | | -e "aws_region=${REGION}" \ |
| | | -e "HostedZoneId=${HOSTZONEID}" \ |
| | | -e "email=name@example.com" \ |
| | | -e "install_ipa_client=false" \ |
| | | -e "repo_method=file" -e "own_repo_path=${REPO_PATH}" -e "repo_version=${REPO_VERSION}" \ |
| | | -e "software_to_deploy=none" |
| | | -e "output_dir=/opt/workdir" \ |
| | | -e@../secret.yml -vv |
| | | |
| | | |
| | | |
| | |
| | | ---- |
| | | |
| | | REGION=ap-southeast-2 |
| | | GUID=devgenericdemo1 |
| | | KEYNAME=ocpkey |
| | | GUID=praktest1 |
| | | ENVTYPE="three-tier-app" |
| | | CLOUDPROVIDER=ec2 |
| | | #To Destroy an Env |
| | | ansible-playbook ./configs/${ENVTYPE}/destroy_env.yml \ |
| | | -e "ANSIBLE_REPO_PATH=${DEPLOYER_REPO_PATH}" \ |
| | | |
| | | ansible-playbook ./ansible/configs/${ENVTYPE}/destroy_env.yml \ |
| | | -e "guid=${GUID}" -e "env_type=${ENVTYPE}" -e "cloud_provider=${CLOUDPROVIDER}" -e "aws_region=${REGION}" \ |
| | | -e "HostedZoneId=${HOSTZONEID}" -e "key_name=${KEYNAME}" -e "subdomain_base_suffix=${BASESUFFIX}" |
| | | -e "key_name=${KEYNAME}" -e "subdomain_base_suffix=${BASESUFFIX}" -e@../secret.yml -vv |
| | | |
| | | ---- |
| | |
| | | |
| | | repo_method: file # Other Options are: file, satellite and rhn |
| | | |
| | | |
| | | install_ipa_client: false |
| | | # Do you want to run a full yum update |
| | | update_packages: false |
| | | #If using repo_method: satellite, you must set these values as well. |
| | |
| | | |
| | | # Is this running from Red Hat Ansible Tower |
| | | tower_run: false |
| | | ### Azure |
| | | ### Azure |
| | | |
| | | # Create a dedicated resourceGroup for this deployment |
| | | az_destroy_method: resource_group |
| | |
| | | - key: "ostype" |
| | | value: "linux" |
| | | - key: "instance_filter" |
| | | value: "{{ env_type }}-{{ email }}" |
| | | value: "{{ env_type }}-{{ email }}" |
| | | rootfs_size: "{{ rootfs_size_bastion }}" |
| | | |
| | | - name: "frontend" |
| | |
| | | - key: "ostype" |
| | | value: "rhel" |
| | | - key: "instance_filter" |
| | | value: "{{ env_type }}-{{ email }}" |
| | | value: "{{ env_type }}-{{ email }}" |
| | | key_name: "{{key_name}}" |
| | | |
| | | - name: "support" |
| | |
| | | - step004 |
| | | - deploy_software |
| | | |
| | | - import_playbook: "./software_playbooks/{{ software_to_deploy }}.yml" |
| | | - import_playbook: "./software_playbooks/{{ software_to_deploy | d('none')}}.yml" |
| | | tags: |
| | | - step004 |
| | | - deploy_software |
| | |
| | | - configure_repos |
| | | - remove_existing_repos |
| | | |
| | | |
| | | ## SB: ROLE_IMPROVE_TASK this needs to be passed as a variable and/or set as a default for the role |
| | | ## Needs to be validated |
| | | - name: create open.repo template on host |
| | | template: |
| | | src: "{{ ANSIBLE_REPO_PATH | default('.') }}/configs/{{ env_type }}/files/repos_template.j2" |
| | | src: "./files/repos_template.j2" ## This currently assumes that the file is in the location the config is in |
| | | dest: /etc/yum.repos.d/open_{{ env_type }}.repo |
| | | tags: |
| | | - create_open_repo_template |
| | |
| | | - admin_password_hash is not defined |
| | | - htpasswd_line is succeeded |
| | | |
| | | ## SB: ROLE_IMPROVE_TASK this needs to be passed as a variable and/or set as a default for the role |
| | | ## Needs to be validated |
| | | ## Role is called from Software_playbooks |
| | | - name: Generate htpasswd file |
| | | template: |
| | | src: "{{ ANSIBLE_REPO_PATH | default('.') }}/configs/{{env_type}}/files/htpasswd.openshift" |
| | | src: "../configs/{{env_type}}/files/htpasswd.openshift" |
| | | dest: /root/htpasswd.openshift |
| | | |
| | | - name: Install Host packages for releases before 3.10 |
| | |
| | | --- |
| | | |
| | | - name: Check if template exists for the environment |
| | | stat: |
| | | path: "{{ANSIBLE_REPO_PATH | default('.')}}/configs/{{ env_type }}/files/cloud_providers/{{cloud_provider}}_cloud_template.j2" |
| | | path: "../configs/{{ env_type }}/files/cloud_providers/{{cloud_provider}}_cloud_template.j2" |
| | | register: stat_local_template |
| | | |
| | | |
| | | ### This is an ugly workaround for the REPO_DIR_PATH removal process, in future, locate_template should possisbly be moved out of the role and into the config. |
| | | ### Adde "../" before config name |
| | | - name: Use CloudFormation template from the environment |
| | | set_fact: |
| | | cloudformation_template_src: "{{ANSIBLE_REPO_PATH | default('.')}}/configs/{{ env_type }}/files/cloud_providers/{{cloud_provider}}_cloud_template.j2" |
| | | cloudformation_template_src: "../configs/{{ env_type }}/files/cloud_providers/{{cloud_provider}}_cloud_template.j2" |
| | | when: stat_local_template.stat.exists |
| | | |
| | | |
| | | - name: Use the default CloudFormation template |
| | | set_fact: |
| | | cloudformation_template_src: "templates/cloud_template.j2" |
| | | when: not stat_local_template.stat.exists |
| | | |
| | | - name: Print cloudformation_template_src |
| | | debug: |
| | | var: cloudformation_template_src |
| | |
| | | ansible-playbook -i ${TARGET_HOST}, ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ansible_ssh_private_key_file=~/.ssh/${SSH_PRIVATE_KEY}" \ |
| | | -e"ansible_ssh_user=${SSH_USERNAME}" \ |
| | | -e"ANSIBLE_REPO_PATH | default('.')=`pwd`" \ |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"ACTION=create" |
| | | |
| | | ---- |
| | | |
| | |
| | | # TODO: use the copy module here |
| | | - name: Move maven to /usr/local |
| | | command: mv -f /root/apache-maven-3.5.4 /usr/local |
| | | ignore_errors: true |
| | | tags: |
| | | - install_openshift_client_vm_packages |
| | | |
| | |
| | | tags: |
| | | - step007 |
| | | roles: |
| | | - { role: "{{ ANSIBLE_REPO_PATH }}/roles/{{ocp_workload}}", when: 'ocp_workload is defined' } |
| | | - { role: "{{ocp_workload}}", when: 'ocp_workload is defined' } |
| | | |
| | | ---- |
| | | NOTE: You might want to change `hosts: all` to fit your requirements |
| | |
| | | ansible-playbook -i ${TARGET_HOST}, ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ansible_ssh_private_key_file=~/.ssh/id_rsa" \ |
| | | -e"ansible_ssh_user=opentlc-mgr" \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_username=${OCP_USERNAME}" \ |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"guid=${GUID}" \ |
| | |
| | | ansible-playbook -i ${TARGET_HOST}, ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ansible_ssh_private_key_file=~/.ssh/id_rsa" \ |
| | | -e"ansible_ssh_user=opentlc-mgr" \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_username=${OCP_USERNAME}" \ |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"guid=${GUID}" \ |
| | |
| | | GUID=user1 |
| | | WORKLOAD="ocp-workload-3scale-experienced" |
| | | ansible-playbook -i localhost, -c local ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"guid=${GUID}" \ |
| | | -e"ACTION=create" |
| | | |
| | | ansible-playbook -i localhost, -c local ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"guid=${GUID}" \ |
| | | -e"ACTION=remove" |
| | |
| | | |
| | | # API manager provision |
| | | ansible-playbook -i localhost, -c local ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"ACTION=create" \ |
| | | -e"subdomain_base=$SUBDOMAIN_BASE" |
| | |
| | | |
| | | |
| | | ansible-playbook -i localhost, -c local ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"ACTION=remove" \ |
| | | -e"subdomain_base=$SUBDOMAIN_BASE" |
| | |
| | | |
| | | # API manager provision |
| | | ansible-playbook -i localhost, -c local ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"ACTION=create" \ |
| | | -e"subdomain_base=$SUBDOMAIN_BASE" \ |
| | |
| | | |
| | | # Tenant Management |
| | | ansible-playbook -i localhost, -c local ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"ACTION=tenant_mgmt" \ |
| | | -e"start_tenant=$START_TENANT" \ |
| | |
| | | # Delete |
| | | REMOVE_TENANTS_ONLY=true |
| | | ansible-playbook -i localhost, -c local ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"ACTION=remove" \ |
| | | -e"subdomain_base=$SUBDOMAIN_BASE" \ |
| | |
| | | ansible-playbook -i ${TARGET_HOST}, ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ansible_ssh_private_key_file=~/.ssh/${SSH_PRIVATE_KEY}" \ |
| | | -e"ansible_ssh_user=${SSH_USERNAME}" \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_username=${OCP_USERNAME}" \ |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"guid=${GUID}" \ |
| | |
| | | ansible-playbook -i ${TARGET_HOST}, ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ansible_ssh_private_key_file=~/.ssh/${SSH_PRIVATE_KEY}" \ |
| | | -e"ansible_ssh_user=${SSH_USERNAME}" \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_username=${OCP_USERNAME}" \ |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"guid=${GUID}" \ |
| | |
| | | ansible-playbook -i ${TARGET_HOST}, ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ansible_ssh_private_key_file=~/.ssh/keytoyourhost.pem" \ |
| | | -e"ansible_ssh_user=ec2-user" \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_username=${OCP_USERNAME}" \ |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"guid=${GUID}" \ |
| | |
| | | ansible-playbook -i ${TARGET_HOST}, ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ansible_ssh_private_key_file=~/.ssh/keytoyourhost.pem" \ |
| | | -e"ansible_ssh_user=ec2-user" \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_username=${OCP_USERNAME}" \ |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"guid=${GUID}" \ |
| | |
| | | tags: |
| | | - step007 |
| | | roles: |
| | | - { role: "{{ ANSIBLE_REPO_PATH }}/roles/{{ocp_workload}}", when: 'ocp_workload is defined' } |
| | | - { role: "{{ocp_workload}}", when: 'ocp_workload is defined' } |
| | | |
| | | ---- |
| | | NOTE: You might want to change `hosts: all` to fit your requirements |
| | |
| | | echo -en "\n\nexecuteAnsibleViaLocalhost(): Provisioning project with GUID = $GUID and OCP_USERNAME = $OCP_USERNAME\n" >> $LOG_FILE |
| | | |
| | | ansible-playbook -i localhost, -c local ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ANSIBLE_REPO_PATH | default('.')=`pwd`" \ |
| | | |
| | | -e"ocp_username=${OCP_USERNAME}" \ |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"guid=${GUID}" \ |
| | |
| | | ensurePreReqs |
| | | login |
| | | executeLoop |
| | | |
| | |
| | | GUID=1 |
| | | OCP_USERNAME="user$GUID" |
| | | ansible-playbook -i localhost, -c local ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_username=${OCP_USERNAME}" \ |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"guid=${GUID}" \ |
| | |
| | | -e"ACTION=create" |
| | | |
| | | ansible-playbook -i localhost, -c local ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_username=${OCP_USERNAME}" \ |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"guid=${GUID}" \ |
| | |
| | | ansible-playbook -i ${TARGET_HOST}, ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ansible_ssh_private_key_file=~/.ssh/${SSH_PRIVATE_KEY}" \ |
| | | -e"ansible_ssh_user=${SSH_USERNAME}" \ |
| | | -e"ANSIBLE_REPO_PATH | default('.')=`pwd`" \ |
| | | |
| | | -e"ocp_username=${OCP_USERNAME}" \ |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"guid=${GUID}" \ |
| | |
| | | |
| | | # a TARGET_HOST is specified in the command line, without using an inventory file |
| | | ansible-playbook -i localhost, -c local ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"guid=${GUID}" \ |
| | | -e"ACTION=create" \ |
| | |
| | | |
| | | # a TARGET_HOST is specified in the command line, without using an inventory file |
| | | ansible-playbook -i localhost, -c local ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_username=${OCP_USERNAME}" \ |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"guid=${GUID}" \ |
| | |
| | | ansible-playbook -i ${TARGET_HOST}, ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ansible_ssh_private_key_file=~/.ssh/${SSH_PRIVATE_KEY}" \ |
| | | -e"ansible_ssh_user=${SSH_USERNAME}" \ |
| | | -e"ANSIBLE_REPO_PATH | default('.')=`pwd`" \ |
| | | |
| | | -e"ocp_username=${OCP_USERNAME}" \ |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"guid=${GUID}" \ |
| | |
| | | GUID=jb45 |
| | | |
| | | ansible-playbook -i localhost, -c local ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"ocp_user_needs_quota=true" \ |
| | | -e"guid=$GUID" \ |
| | |
| | | -e"ocp_username=dtorresf-redhat.com" |
| | | |
| | | ansible-playbook -i localhost, -c local ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"guid=$GUID" \ |
| | | -e"ACTION=remove" \ |
| | |
| | | ansible-playbook -i ${TARGET_HOST}, ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ansible_ssh_private_key_file=~/.ssh/keytoyourhost.pem" \ |
| | | -e"ansible_ssh_user=ec2-user" \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_username=${OCP_USERNAME}" \ |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"guid=${GUID}" \ |
| | |
| | | ansible-playbook -i ${TARGET_HOST}, ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ansible_ssh_private_key_file=~/.ssh/keytoyourhost.pem" \ |
| | | -e"ansible_ssh_user=ec2-user" \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_username=${OCP_USERNAME}" \ |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"guid=${GUID}" \ |
| | |
| | | tags: |
| | | - step007 |
| | | roles: |
| | | - { role: "{{ ANSIBLE_REPO_PATH }}/roles/{{ocp_workload}}", when: 'ocp_workload is defined' } |
| | | - { role: "{{ocp_workload}}", when: 'ocp_workload is defined' } |
| | | |
| | | ---- |
| | | NOTE: You might want to change `hosts: all` to fit your requirements |
| | |
| | | tags: |
| | | - step007 |
| | | roles: |
| | | - { role: "{{ ANSIBLE_REPO_PATH }}/roles/{{ocp_workload}}", when: 'ocp_workload is defined' } |
| | | - { role: "{{ocp_workload}}", when: 'ocp_workload is defined' } |
| | | |
| | | ---- |
| | | NOTE: You might want to change `hosts: all` to fit your requirements |
| | |
| | | ansible-playbook -i ${TARGET_HOST}, ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ansible_ssh_private_key_file=~/.ssh/${SSH_PRIVATE_KEY}" \ |
| | | -e"ansible_ssh_user=${SSH_USER}" \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_username=${OCP_USERNAME}" \ |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"guid=${GUID}" \ |
| | |
| | | ansible-playbook -i ${TARGET_HOST}, ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ansible_ssh_private_key_file=~/.ssh/${SSH_PRIVATE_KEY}" \ |
| | | -e"ansible_ssh_user=${SSH_USER}" \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_username=${OCP_USERNAME}" \ |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"guid=${GUID}" \ |
| | |
| | | ansible-playbook -i ${TARGET_HOST}, ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ansible_ssh_private_key_file=~/.ssh/keytoyourhost.pem" \ |
| | | -e"ansible_ssh_user=ec2-user" \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_username=${OCP_USERNAME}" \ |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"silent=False" \ |
| | |
| | | ansible-playbook -i ${TARGET_HOST}, ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ansible_ssh_private_key_file=~/.ssh/keytoyourhost.pem" \ |
| | | -e"ansible_ssh_user=ec2-user" \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_username=${OCP_USERNAME}" \ |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"guid=${GUID}" \ |
| | |
| | | tags: |
| | | - step007 |
| | | roles: |
| | | - { role: "{{ ANSIBLE_REPO_PATH }}/roles/{{ocp_workload}}", when: 'ocp_workload is defined' } |
| | | - { role: "{{ocp_workload}}", when: 'ocp_workload is defined' } |
| | | ---- |
| | | NOTE: You might want to change `hosts: all` to fit your requirements |
| | | |
| | |
| | | tags: |
| | | - step007 |
| | | roles: |
| | | - { role: "{{ ANSIBLE_REPO_PATH }}/roles/{{ocp_workload}}", when: 'ocp_workload is defined' } |
| | | - { role: "{{ocp_workload}}", when: 'ocp_workload is defined' } |
| | | |
| | | ---- |
| | | NOTE: You might want to change `hosts: all` to fit your requirements |
| | |
| | | ansible-playbook -i ${TARGET_HOST}, ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ansible_ssh_private_key_file=~/.ssh/${SSH_PRIVATE_KEY}" \ |
| | | -e"ansible_ssh_user=${SSH_USER}" \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_username=${OCP_USERNAME}" \ |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"guid=${GUID}" \ |
| | |
| | | ansible-playbook -i ${TARGET_HOST}, ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ansible_ssh_private_key_file=~/.ssh/${SSH_PRIVATE_KEY}" \ |
| | | -e"ansible_ssh_user=${SSH_USER}" \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_username=${OCP_USERNAME}" \ |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"guid=${GUID}" \ |
| | |
| | | echo -en "\n\nexecuteAnsibleViaLocalhost(): Provisioning project with GUID = $GUID and OCP_USERNAME = $OCP_USERNAME\n" >> $LOG_FILE |
| | | |
| | | ansible-playbook -i localhost, -c local ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ANSIBLE_REPO_PATH | default('.')=`pwd`" \ |
| | | |
| | | -e"ocp_username=${OCP_USERNAME}" \ |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"guid=${GUID}" \ |
| | |
| | | ----- |
| | | |
| | | ansible-playbook -i ${TARGET_HOST}, -c local ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e "ANSIBLE_REPO_PATH=`pwd`" \ |
| | | -e "ocp_username=${OCP_USERNAME}" \ |
| | | -e "ocp_workload=${WORKLOAD}" \ |
| | | -e "guid=${GUID}" \ |
| | |
| | | -e "ACTION=create" |
| | | |
| | | ansible-playbook -i ${TARGET_HOST}, -c local ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e "ANSIBLE_REPO_PATH=`pwd`" \ |
| | | -e "ocp_username=${OCP_USERNAME}" \ |
| | | -e "ocp_workload=${WORKLOAD}" \ |
| | | -e "guid=${GUID}" \ |
| | |
| | | ansible-playbook -i ${TARGET_HOST}, ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ansible_ssh_private_key_file=~/.ssh/${SSH_PRIVATE_KEY}" \ |
| | | -e"ansible_ssh_user=${SSH_USERNAME}" \ |
| | | -e"ANSIBLE_REPO_PATH | default('.')=`pwd`" \ |
| | | |
| | | -e"ocp_username=${OCP_USERNAME}" \ |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"guid=${GUID}" \ |
| | |
| | | ansible-playbook -i ${TARGET_HOST}, ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ansible_ssh_private_key_file=~/.ssh/${SSH_PRIVATE_KEY}" \ |
| | | -e"ansible_ssh_user=${SSH_USERNAME}" \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_username=${OCP_USERNAME}" \ |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"guid=${GUID}" \ |
| | |
| | | ansible-playbook -i ${TARGET_HOST}, ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ansible_ssh_private_key_file=~/.ssh/${SSH_PRIVATE_KEY}" \ |
| | | -e"ansible_ssh_user=${SSH_USERNAME}" \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_username=${OCP_USERNAME}" \ |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"guid=${GUID}" \ |
| | |
| | | tags: |
| | | - step007 |
| | | roles: |
| | | - { role: "{{ ANSIBLE_REPO_PATH }}/roles/{{ocp_workload}}", when: 'ocp_workload is defined' } |
| | | - { role: "{{ocp_workload}}", when: 'ocp_workload is defined' } |
| | | |
| | | ---- |
| | | NOTE: You might want to change `hosts: all` to fit your requirements |
| | |
| | | ansible-playbook -i ${TARGET_HOST}, ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ansible_ssh_private_key_file=~/.ssh/${SSH_PRIVATE_KEY}" \ |
| | | -e"ansible_ssh_user=${SSH_USER}" \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"guid=${GUID}" \ |
| | | -e"ocp_user_needs_quota=false" \ |
| | |
| | | ansible-playbook -i ${TARGET_HOST}, ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ansible_ssh_private_key_file=~/.ssh/${SSH_PRIVATE_KEY}" \ |
| | | -e"ansible_ssh_user=${SSH_USER}" \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"guid=${GUID}" \ |
| | | -e"ACTION=remove" |
| | |
| | | tags: |
| | | - step007 |
| | | roles: |
| | | - { role: "{{ ANSIBLE_REPO_PATH }}/roles/{{ocp_workload}}", when: 'ocp_workload is defined' } |
| | | - { role: "{{ocp_workload}}", when: 'ocp_workload is defined' } |
| | | |
| | | ---- |
| | | NOTE: You might want to change `hosts: all` to fit your requirements |
| | |
| | | ansible-playbook -i ${TARGET_HOST}, ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ansible_ssh_private_key_file=~/.ssh/${SSH_PRIVATE_KEY}" \ |
| | | -e"ansible_ssh_user=${SSH_USER}" \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_username=${OCP_USERNAME}" \ |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"guid=${GUID}" \ |
| | |
| | | ansible-playbook -i ${TARGET_HOST}, ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ansible_ssh_private_key_file=~/.ssh/${SSH_PRIVATE_KEY}" \ |
| | | -e"ansible_ssh_user=${SSH_USER}" \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_username=${OCP_USERNAME}" \ |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"guid=${GUID}" \ |
| | |
| | | WORKLOAD="ocp-workload-istio-community" |
| | | |
| | | ansible-playbook -i localhost, -c local ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"ACTION=create" |
| | | |
| | | ansible-playbook -i localhost, -c local ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"ACTION=remove" |
| | | |
| | |
| | | tags: |
| | | - step007 |
| | | roles: |
| | | - { role: "{{ ANSIBLE_REPO_PATH }}/roles/{{ocp_workload}}", when: 'ocp_workload is defined' } |
| | | - { role: "{{ocp_workload}}", when: 'ocp_workload is defined' } |
| | | |
| | | ---- |
| | | NOTE: You might want to change `hosts: all` to fit your requirements |
| | |
| | | ansible-playbook -i ${TARGET_HOST}, ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ansible_ssh_private_key_file=~/.ssh/${SSH_PRIVATE_KEY}" \ |
| | | -e"ansible_ssh_user=${SSH_USER}" \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_username=${OCP_USERNAME}" \ |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"guid=${GUID}" \ |
| | |
| | | ansible-playbook -i ${TARGET_HOST}, ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ansible_ssh_private_key_file=~/.ssh/${SSH_PRIVATE_KEY}" \ |
| | | -e"ansible_ssh_user=${SSH_USER}" \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_username=${OCP_USERNAME}" \ |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"guid=${GUID}" \ |
| | |
| | | tags: |
| | | - step007 |
| | | roles: |
| | | - { role: "{{ ANSIBLE_REPO_PATH }}/roles/{{ocp_workload}}", when: 'ocp_workload is defined' } |
| | | - { role: "{{ocp_workload}}", when: 'ocp_workload is defined' } |
| | | |
| | | ---- |
| | | NOTE: You might want to change `hosts: all` to fit your requirements |
| | |
| | | ansible-playbook -i ${TARGET_HOST}, ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ansible_ssh_private_key_file=~/.ssh/${SSH_PRIVATE_KEY}" \ |
| | | -e"ansible_ssh_user=${SSH_USER}" \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_username=${OCP_USERNAME}" \ |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"guid=${GUID}" \ |
| | |
| | | ansible-playbook -i ${TARGET_HOST}, ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ansible_ssh_private_key_file=~/.ssh/${SSH_PRIVATE_KEY}" \ |
| | | -e"ansible_ssh_user=${SSH_USER}" \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_username=${OCP_USERNAME}" \ |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"guid=${GUID}" \ |
| | |
| | | |
| | | # API manager provision |
| | | ansible-playbook -i localhost, -c local ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"ACTION=create" \ |
| | | -e"subdomain_base=$SUBDOMAIN_BASE" |
| | |
| | | |
| | | # Tenant Management |
| | | ansible-playbook -i localhost, -c local ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"ACTION=tenant_mgmt" \ |
| | | -e"start_tenant=$START_TENANT" \ |
| | |
| | | # Delete |
| | | REMOVE_TENANTS_ONLY=true |
| | | ansible-playbook -i localhost, -c local ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"ACTION=remove" \ |
| | | -e"subdomain_base=$SUBDOMAIN_BASE" \ |
| | |
| | | echo -en "\n\nexecuteAnsibleViaLocalhost(): Provisioning project with GUID = $GUID and OCP_USERNAME = $OCP_USERNAME\n" >> $LOG_FILE |
| | | |
| | | ansible-playbook -i localhost, -c local ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ANSIBLE_REPO_PATH | default('.')=`pwd`" \ |
| | | |
| | | -e"ocp_username=${OCP_USERNAME}" \ |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"guid=${GUID}" \ |
| | |
| | | GUID=a1001 |
| | | OCP_USERNAME="developer" |
| | | ansible-playbook -i localhost, -c local ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_username=${OCP_USERNAME}" \ |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"guid=${GUID}" \ |
| | | -e"ACTION=create" |
| | | |
| | | ansible-playbook -i localhost, -c local ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_username=${OCP_USERNAME}" \ |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"guid=${GUID}" \ |
| | |
| | | WORKLOAD="ocp-workload-rhte-mw-bfield-migration" |
| | | OCP_USERNAME="user1" |
| | | ansible-playbook -i localhost, -c local ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_username=${OCP_USERNAME}" \ |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"ACTION=create" |
| | | |
| | | ansible-playbook -i localhost, -c local ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_username=${OCP_USERNAME}" \ |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"ACTION=remove" |
| | |
| | | OCP_USERNAME="user$GUID" |
| | | HOST_GUID=`oc whoami --show-server | cut -d'.' -f 2` |
| | | ansible-playbook -i localhost, -c local ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_username=${OCP_USERNAME}" \ |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"guid=${GUID}" \ |
| | |
| | | -e"ACTION=create" |
| | | |
| | | ansible-playbook -i localhost, -c local ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_username=${OCP_USERNAME}" \ |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"guid=${GUID}" \ |
| | |
| | | ansible-playbook -i ${TARGET_HOST}, ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ansible_ssh_private_key_file=~/.ssh/${SSH_PRIVATE_KEY}" \ |
| | | -e"ansible_ssh_user=${SSH_USERNAME}" \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_username=${OCP_USERNAME}" \ |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"guid=${GUID}" \ |
| | |
| | | ansible-playbook -i ${TARGET_HOST}, ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ansible_ssh_private_key_file=~/.ssh/${SSH_PRIVATE_KEY}" \ |
| | | -e"ansible_ssh_user=${SSH_USERNAME}" \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_username=${OCP_USERNAME}" \ |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"guid=${GUID}" \ |
| | |
| | | echo -en "\n\nexecuteAnsibleViaLocalhost(): Provisioning project with GUID = $GUID and OCP_USERNAME = $OCP_USERNAME\n" >> $LOG_FILE |
| | | |
| | | ansible-playbook -i localhost, -c local ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ANSIBLE_REPO_PATH | default('.')=`pwd`" \ |
| | | |
| | | -e"ocp_username=${OCP_USERNAME}" \ |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"guid=${GUID}" \ |
| | |
| | | |
| | | # a TARGET_HOST is specified in the command line, without using an inventory file |
| | | ansible-playbook -i localhost, -c local ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_username=${OCP_USERNAME}" \ |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"guid=${GUID}" \ |
| | |
| | | |
| | | |
| | | ansible-playbook -i localhost, -c local ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_username=${OCP_USERNAME}" \ |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"guid=${GUID}" \ |
| | |
| | | WORKLOAD="ocp-workload-rhte-mw-op-intel" |
| | | |
| | | $ ansible-playbook -i localhost, -c local ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"ocp_username=${OCP_USERNAME}" \ |
| | | -e"ACTION=create" |
| | |
| | | |
| | | |
| | | $ ansible-playbook -i localhost, -c local ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"ocp_username=${OCP_USERNAME}" \ |
| | | -e"ACTION=remove" |
| | |
| | | tags: |
| | | - step007 |
| | | roles: |
| | | - { role: "{{ ANSIBLE_REPO_PATH }}/roles/{{ocp_workload}}", when: 'ocp_workload is defined' } |
| | | - { role: "{{ocp_workload}}", when: 'ocp_workload is defined' } |
| | | |
| | | ---- |
| | | NOTE: You might want to change `hosts: all` to fit your requirements |
| | |
| | | ansible-playbook -i ${TARGET_HOST}, ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ansible_ssh_private_key_file=~/.ssh/${SSH_PRIVATE_KEY}" \ |
| | | -e"ansible_ssh_user=${SSH_USER}" \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_username=${OCP_USERNAME}" \ |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"guid=${GUID}" \ |
| | |
| | | ansible-playbook -i ${TARGET_HOST}, ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ansible_ssh_private_key_file=~/.ssh/${SSH_PRIVATE_KEY}" \ |
| | | -e"ansible_ssh_user=${SSH_USER}" \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_username=${OCP_USERNAME}" \ |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"admin_project=${WORKSHOP_PROJECT}" \ |
| | |
| | | ---- |
| | | |
| | | NOTE: Make sure to use --force if you have those roles with different version, and Make |
| | | sure to use the roles defined in that file (and the versions there). |
| | | sure to use the roles defined in that file (and the versions there). |
| | |
| | | ansible-playbook -v -i ${TARGET_HOST}, ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ansible_ssh_private_key_file=~/.ssh/${SSH_PRIVATE_KEY}" \ |
| | | -e"ansible_ssh_user=${SSH_USER}" \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_username=${OCP_USERNAME}" \ |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"guid=${GUID}" \ |
| | |
| | | ansible-playbook -v -i ${TARGET_HOST}, ./configs/ocp-workloads/ocp-workload.yml \ |
| | | -e"ansible_ssh_private_key_file=~/.ssh/${SSH_PRIVATE_KEY}" \ |
| | | -e"ansible_ssh_user=${SSH_USER}" \ |
| | | -e"ANSIBLE_REPO_PATH=`pwd`" \ |
| | | |
| | | -e"ocp_username=${OCP_USERNAME}" \ |
| | | -e"ocp_workload=${WORKLOAD}" \ |
| | | -e"guid=${GUID}" \ |
| | |
| | | |
| | | - name: create open.repo template on host |
| | | template: |
| | | src: "{{ ANSIBLE_REPO_PATH | default('.') }}/configs/{{ env_type }}/files/repos_template.j2" |
| | | src: "./files/repos_template.j2" |
| | | dest: /etc/yum.repos.d/open_{{ env_type }}.repo |
| | | tags: |
| | | - create_open_repo_template |
| | |
| | | name: 'ansible-tower-cli' |
| | | version: '3.1.8' |
| | | |
| | | ## SB: ROLE_IMPROVE_TASK this needs to be passed as a variable and/or set as a default for the role |
| | | ## Needs to be validated |
| | | ## Assumed this is running from the config dir |
| | | |
| | | - name: Configure the tower cli file |
| | | template: |
| | | src: "{{ ANSIBLE_REPO_PATH | default('.') }}/files/tower_cli.j2" |
| | | src: "./files/tower_cli.j2" |
| | | dest: "~/.tower_cli.cfg" |
| | | mode: 0640 |
| | | |
| | | ## SB: ROLE_IMPROVE_TASK this needs to be passed as a variable and/or set as a default for the role |
| | | ## Needs to be validated |
| | | ## Assumed this is running from the config dir |
| | | |
| | | - name: copy the license file |
| | | copy: |
| | | src: "{{ ANSIBLE_REPO_PATH | default('.') }}/files/tower_license" |
| | | src: "./files/tower_license" |
| | | dest: "/tmp/tower_license" |
| | | |
| | | - name: copy the private key |
| | |
| | | src: "{{output_dir}}/{{ guid + 'key' }}" |
| | | dest: /tmp/id_rsa |
| | | mode: 0640 |
| | | |
| | | |
| | | |
| | | ## SB: ROLE_IMPROVE_TASK this needs to be passed as a variable and/or set as a default for the role |
| | | ## Needs to be validated |
| | | ## Assumed this is running from the config dir |
| | | |
| | | - name: generate ansible hosts file |
| | | template: |
| | | src: "{{ ANSIBLE_REPO_PATH | default('.') }}/configs/{{ env_type }}/files/hosts_template.j2" |
| | | src: "./configs/{{ env_type }}/files/hosts_template.j2" |
| | | dest: "/etc/ansible/hosts" |
| | | |
| | | - name: Add the license of tower |