diff options
author | Jason DeTiberus <jdetiber@redhat.com> | 2015-03-13 03:58:23 -0400 |
---|---|---|
committer | Jhon Honce <jhonce@redhat.com> | 2015-03-24 11:13:26 -0700 |
commit | 9199379f94f6b11a4841e31f6c58a11c1e9f8c3a (patch) | |
tree | 3250d896343b148edebf4e4e7283261c3eb60acb /playbooks/gce/openshift-master/config.yml | |
parent | e337235d471468b400acadcbd56ad14f39a2a222 (diff) | |
download | openshift-9199379f94f6b11a4841e31f6c58a11c1e9f8c3a.tar.gz openshift-9199379f94f6b11a4841e31f6c58a11c1e9f8c3a.tar.bz2 openshift-9199379f94f6b11a4841e31f6c58a11c1e9f8c3a.tar.xz openshift-9199379f94f6b11a4841e31f6c58a11c1e9f8c3a.zip |
Various fixes
- playbooks/gce/openshift-cluster:
- Remove some stray debugging statements
- Some minor formatting fixes
- removing un-necessary quotes
- cleaning up some jinja templates for readability
- add a play to the launch playbook to apply the os_update_latest role on
all hosts in the new environment
- improve setting groups and gce_public_ip when using add_host module
- set gce_public_ip as a variable for the host using the returned gce instance_data
- add a group for each tag configured on the host (pre-pending tag_ to the
tag name)
- update the openshift-master/config.yml and openshift-node/config.yml
includes to use the tag_env-host-type groups
- openshift-{master,node}/config.yml
- Some cleanup
- remove some extraneous quotes
- remove connection: ssh from remote hosts, since it is the default
- remove user: root and instead set ansible_ssh_user in
inventory/gce/group_vars/all
- set openshift_public_ip and openshift_env to templated values in
inventory/gce/group_vars/all as well
- no longer set openshift_node_ips for the master host, since nodes will
register themselves now when they are configured (prevent reboot on
adding nodes)
- move setting openshift_master_ips and openshift_public_master_ips using
set_fact and instead use the vars: of the 'Configure Instances' play
Diffstat (limited to 'playbooks/gce/openshift-master/config.yml')
-rw-r--r-- | playbooks/gce/openshift-master/config.yml | 40 |
1 files changed, 5 insertions, 35 deletions
diff --git a/playbooks/gce/openshift-master/config.yml b/playbooks/gce/openshift-master/config.yml index 5581e8401..812dcb91b 100644 --- a/playbooks/gce/openshift-master/config.yml +++ b/playbooks/gce/openshift-master/config.yml @@ -1,50 +1,20 @@ -- name: "master/config.yml, populate oo_hosts_to_config host group if needed" +- name: master/config.yml, populate oo_masters_to_config host group if needed hosts: localhost gather_facts: no tasks: - name: "Evaluate oo_host_group_exp if it's set" - add_host: "name={{ item }} groups=oo_hosts_to_config" + add_host: "name={{ item }} groups=oo_masters_to_config" with_items: "{{ oo_host_group_exp | default('') }}" when: oo_host_group_exp is defined - name: "Gather facts for nodes in {{ oo_env }}" hosts: "tag_env-host-type-{{ oo_env }}-openshift-node" - connection: ssh - user: root - -- name: "Retrieve public ip" - hosts: oo_hosts_to_config - connection: ssh - user: root - gather_facts: yes - tasks: - - command: 'curl "http://metadata.google.internal/computeMetadata/v1/instance/network-interfaces/0/access-configs/0/external-ip" -H "Metadata-Flavor: Google"' - register: output - - set_fact: gce_public_ip="{{ output.stdout }}" - -- name: "Set Origin specific facts on localhost (for later use)" - hosts: localhost - gather_facts: no - tasks: - - name: Setting openshift_node_ips fact on localhost - set_fact: - openshift_node_ips: "{{ hostvars - | oo_select_keys(groups['tag_env-host-type-' + oo_env + '-openshift-node']) - | oo_collect(attribute='ansible_default_ipv4.address') }}" - when: groups['tag_env-host-type-' + oo_env + '-openshift-node'] is defined - name: "Configure instances" - hosts: oo_hosts_to_config - connection: ssh - user: root + hosts: oo_masters_to_config vars_files: - - vars.yml + - vars.yml roles: - - { - role: openshift_master, - openshift_node_ips: "{{ hostvars['localhost'].openshift_node_ips | default(['']) }}", - openshift_public_ip: "{{ gce_public_ip }}", - openshift_env: "{{ oo_env }}", - } + - openshift_master - pods - os_env_extras |