sborenst
2017-10-27 44f15aa4c1ae74fc5ed9cc84aa23499a2a2f3bdc
tested three-tier-app with new ec2 method
3 files modified
15 ■■■■ changed files
ansible/configs/three-tier-app/README.adoc 5 ●●●●● patch | view | raw | blame | history
ansible/configs/three-tier-app/files/hosts_template.j2 2 ●●● patch | view | raw | blame | history
ansible/configs/three-tier-app/pre_software.yml 8 ●●●● patch | view | raw | blame | history
ansible/configs/three-tier-app/README.adoc
@@ -47,16 +47,17 @@
----
REGION=ap-southeast-2
KEYNAME=ocpkey
GUID=3tierapp
GUID=ec2test3tapp1
ENVTYPE="three-tier-app"
CLOUDPROVIDER=ec2
HOSTZONEID='Z3IHLWJZOU9SRT'
REPO_PATH='https://admin.example.com/repos/ocp/3.5/'
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}" \
ansible/configs/three-tier-app/files/hosts_template.j2
@@ -35,6 +35,6 @@
## 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}} ssh_hose={{host}}
{% endfor %}
ansible/configs/three-tier-app/pre_software.yml
@@ -21,7 +21,7 @@
- name: Configure all hosts with Repositories, Common Files and Set environment key
  hosts:
    - "{{ ('tag_Project_' ~ env_type ~ '_' ~ guid) | replace('-', '_') }}:!{{ ('tag_' ~ env_type ~ '_' ~ guid ~ '_ostype_windows') | replace('-', '_') }}"
    - all:!windows
  become: true
  gather_facts: False
  vars_files:
@@ -37,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"
@@ -50,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:
@@ -73,7 +73,7 @@
        create: yes
        line: '%opentlc-access ALL=(ALL)       NOPASSWD: ALL'
        validate: '/usr/sbin/visudo -cf %s'
- name: PreSoftware flight-check
  hosts: localhost
  connection: local