Skip to content

Commit

Permalink
tested three-tier-app with new ec2 method
Browse files Browse the repository at this point in the history
  • Loading branch information
sborenst committed Oct 27, 2017
1 parent e600716 commit 44f15aa
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
5 changes: 3 additions & 2 deletions ansible/configs/three-tier-app/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,17 @@ You can run the playbook with the following arguments to overwrite the default v
----
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}" \
Expand Down
2 changes: 1 addition & 1 deletion ansible/configs/three-tier-app/files/hosts_template.j2
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ appdb{{loop.index}}.{{chomped_zone_internal_dns}} ssh_host={{host}}

## 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 %}
8 changes: 4 additions & 4 deletions ansible/configs/three-tier-app/pre_software.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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"
Expand All @@ -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:
Expand All @@ -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
Expand Down

0 comments on commit 44f15aa

Please sign in to comment.