ansible/configs/generic-example/README.adoc | ●●●●● patch | view | raw | blame | history | |
ansible/configs/generic-example/files/hosts_template.j2 | ●●●●● patch | view | raw | blame | history | |
ansible/configs/generic-example/post_software.yml | ●●●●● patch | view | raw | blame | history | |
ansible/configs/generic-example/pre_software.yml | ●●●●● patch | view | raw | blame | history |
ansible/configs/generic-example/README.adoc
@@ -47,16 +47,16 @@ ---- REGION=ap-southeast-2 KEYNAME=ocpkey GUID=devgenericdemo1 GUID=ec2generictest1 ENVTYPE="generic-example" CLOUDPROVIDER=ec2 HOSTZONEID='Z3IHLWJZOU9SRT' REPO_PATH='https://admin.example.com/repos/ocp/3.5/' REPO_PATH='https://admin.example.com/repos/ocp/3.6/' BASESUFFIX='.example.opentlc.com' DEPLOYER_REPO_PATH=`pwd` ansible-playbook \ -i ${DEPLOYER_REPO_PATH}/inventory/${CLOUDPROVIDER}.py ${DEPLOYER_REPO_PATH}/main.yml \ ${DEPLOYER_REPO_PATH}/main.yml \ -e "ANSIBLE_REPO_PATH=${DEPLOYER_REPO_PATH}" \ -e "guid=${GUID}" \ -e "env_type=${ENVTYPE}" \ @@ -67,7 +67,7 @@ -e "HostedZoneId=${HOSTZONEID}" \ -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 "software_to_deploy=none" -e "ANSIBLE_REPO_PATH=${DEPLOYER_REPO_PATH}" @@ -85,7 +85,7 @@ HOSTZONEID='Z3IHLWJZOU9SRT' BASESUFFIX='.example.opentlc.com' #To Destroy an Env ansible-playbook -i inventory/ ./configs/${ENVTYPE}/destroy_env.yml \ ansible-playbook \ -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}" ansible/configs/generic-example/files/hosts_template.j2
@@ -15,19 +15,19 @@ [publichosts] ## These are the publichosts {% for host in groups[('tag_' + project_tag + '_publichost') | replace('-', '_') ] %} {% for host in groups['publichosts'] %} publichost{{loop.index}}.{{chomped_zone_internal_dns}} public_host_name=publichost{{loop.index}}.{{guid}}{{subdomain_base_suffix}} ansible_ssh_user={{remote_user}} {% endfor %} [internalhosts] ## These are the internalhosts {% for host in groups[('tag_' + project_tag + '_internalhost') | replace('-', '_') ] %} {% for host in groups['internalhosts'] %} internalhost{{loop.index}}.{{chomped_zone_internal_dns}} ansible_ssh_user={{remote_user}} {% endfor %} [internalhosts] ## These are the supporthosts [support] {% for host in groups[('tag_' + project_tag + '_support') | replace('-', '_') ] %} {% for host in groups['support'] %} support{{loop.index}}.{{chomped_zone_internal_dns}} ansible_ssh_user={{remote_user}} {% endfor %} ansible/configs/generic-example/post_software.yml
@@ -1,5 +1,5 @@ - name: Step 00xxxxx post software hosts: "{{ ('tag_' ~ env_type ~ '_' ~ guid ~ '_support') | replace('-', '_') }}" hosts: support gather_facts: False become: yes vars_files: ansible/configs/generic-example/pre_software.yml
@@ -20,7 +20,8 @@ # Cloudformation template or equivalent should tag all hosts with Project:{{ env_type }}-{{ guid }} - name: Configure all hosts with Repositories, Common Files and Set environment key hosts: "{{ ('tag_Project_' ~ env_type ~ '_' ~ guid) | replace('-', '_') }}" hosts: - all:!windows become: true gather_facts: False vars_files: @@ -36,7 +37,7 @@ - { role: "{{ ANSIBLE_REPO_PATH }}/roles/set_env_authorized_key", when: 'set_env_authorized_key' } - name: Configuring Bastion Hosts hosts: "{{ ('tag_' ~ env_type ~ '_' ~ guid ~ '_bastion') | replace('-', '_') }}" hosts: bastions become: true vars_files: - "{{ ANSIBLE_REPO_PATH }}/configs/{{ env_type }}/env_vars.yml" @@ -49,7 +50,7 @@ - bastion_tasks - name: Pre-software verification and ipa client hosts: "{{ ('tag_' ~ env_type ~ '_' ~ guid ~ '_bastion') | replace('-', '_') }}" hosts: bastions gather_facts: False become: yes tags: