diff options
Diffstat (limited to 'playbooks')
8 files changed, 37 insertions, 13 deletions
| diff --git a/playbooks/aws/README.md b/playbooks/aws/README.md index c2da4b632..2b3d4329e 100644 --- a/playbooks/aws/README.md +++ b/playbooks/aws/README.md @@ -43,6 +43,8 @@ The current expected work flow should be to provide an AMI with access to Opensh  ```yaml  --- +# when creating an AMI set this to True +# when installing a cluster set this to False  openshift_node_bootstrap: True  # specify a clusterid @@ -96,6 +98,11 @@ etcd  ################################################################################  # openshift_deployment_type is required for installation  openshift_deployment_type=origin + +# required when building an AMI.  This will +# be dependent on the version provided by the yum repository +openshift_pkg_version=-3.6.0 +  openshift_master_bootstrap_enabled=True  openshift_hosted_router_wait=False diff --git a/playbooks/aws/openshift-cluster/build_ami.yml b/playbooks/aws/openshift-cluster/build_ami.yml index d3c0057b5..fc11205d8 100644 --- a/playbooks/aws/openshift-cluster/build_ami.yml +++ b/playbooks/aws/openshift-cluster/build_ami.yml @@ -63,15 +63,8 @@  - name: run the std_include    include: ../../common/openshift-cluster/initialize_openshift_repos.yml -- hosts: nodes -  remote_user: root -  tasks: -  - set_fact: -      openshift_node_bootstrap: True - -  - name: run openshift image preparation -    include_role: -      name: openshift_node +- name: install node config +  include: ../../common/openshift-node/config.yml  - hosts: localhost    connection: local diff --git a/playbooks/aws/openshift-cluster/provisioning_vars.example.yml b/playbooks/aws/openshift-cluster/provisioning_vars.example.yml index 5a30ad3a5..28eb9c993 100644 --- a/playbooks/aws/openshift-cluster/provisioning_vars.example.yml +++ b/playbooks/aws/openshift-cluster/provisioning_vars.example.yml @@ -1,4 +1,6 @@  --- +# when creating an AMI set this option to True +# when installing the cluster, set this to False  openshift_node_bootstrap: True  # specify a clusterid diff --git a/playbooks/common/openshift-cluster/config.yml b/playbooks/common/openshift-cluster/config.yml index 3baa3c54d..bbd5a0185 100644 --- a/playbooks/common/openshift-cluster/config.yml +++ b/playbooks/common/openshift-cluster/config.yml @@ -25,10 +25,11 @@  - name: Set hostname    hosts: oo_masters_to_config:oo_nodes_to_config    tasks: +  # TODO: switch back to hostname module once we depend on ansible-2.4 +  # https://github.com/ansible/ansible/pull/25906    - name: Set hostname -    hostname: -      name: "{{ openshift.common.hostname }}" -    when: openshift_set_hostname | default(True) | bool +    command: "hostnamectl set-hostname {{ openshift.common.hostname }}" +    when: openshift_set_hostname | default(false,true) | bool  - include: ../openshift-etcd/config.yml diff --git a/playbooks/common/openshift-cluster/initialize_openshift_version.yml b/playbooks/common/openshift-cluster/initialize_openshift_version.yml index 7112a6084..7af6b25bc 100644 --- a/playbooks/common/openshift-cluster/initialize_openshift_version.yml +++ b/playbooks/common/openshift-cluster/initialize_openshift_version.yml @@ -12,5 +12,10 @@    hosts: oo_all_hosts:!oo_first_master    vars:      openshift_version: "{{ hostvars[groups.oo_first_master.0].openshift_version }}" +  pre_tasks: +  - set_fact: +      openshift_pkg_version: -{{ openshift_version }} +    when: openshift_pkg_version is not defined +  - debug: msg="openshift_pkg_version set to {{ openshift_pkg_version }}"    roles:    - openshift_version diff --git a/playbooks/common/openshift-cluster/upgrades/pre/verify_inventory_vars.yml b/playbooks/common/openshift-cluster/upgrades/pre/verify_inventory_vars.yml index 9a959a959..78923e04f 100644 --- a/playbooks/common/openshift-cluster/upgrades/pre/verify_inventory_vars.yml +++ b/playbooks/common/openshift-cluster/upgrades/pre/verify_inventory_vars.yml @@ -9,6 +9,21 @@          deployment types      when: deployment_type not in ['origin','openshift-enterprise', 'online'] +  # osm_cluster_network_cidr, osm_host_subnet_length and openshift_portal_net are +  # required when upgrading to avoid changes that may occur between releases +  # Reference: https://bugzilla.redhat.com/show_bug.cgi?id=1451023 +  - assert: +      that: +      - "osm_cluster_network_cidr is defined" +      - "osm_host_subnet_length is defined" +      - "openshift_portal_net is defined" +      msg: > +        osm_cluster_network_cidr, osm_host_subnet_length, and openshift_portal_net are required inventory +        variables when upgrading. These variables should match what is currently used in the cluster. If +        you don't remember what these values are you can find them in /etc/origin/master/master-config.yaml +        on a master with the names clusterNetworkCIDR (osm_cluster_network_cidr), +        osm_host_subnet_length (hostSubnetLength), and openshift_portal_net (hostSubnetLength). +    # Error out in situations where the user has older versions specified in their    # inventory in any of the openshift_release, openshift_image_tag, and    # openshift_pkg_version variables. These must be removed or updated to proceed diff --git a/playbooks/common/openshift-master/restart.yml b/playbooks/common/openshift-master/restart.yml index 6fec346c3..4d73b8124 100644 --- a/playbooks/common/openshift-master/restart.yml +++ b/playbooks/common/openshift-master/restart.yml @@ -7,7 +7,7 @@      openshift_master_ha: "{{ groups.oo_masters_to_config | length > 1 }}"    serial: 1    handlers: -  - include: roles/openshift_master/handlers/main.yml +  - include: ../../../roles/openshift_master/handlers/main.yml      static: yes    roles:    - openshift_facts diff --git a/playbooks/common/openshift-node/config.yml b/playbooks/common/openshift-node/config.yml index c7afc78ac..0801c41ff 100644 --- a/playbooks/common/openshift-node/config.yml +++ b/playbooks/common/openshift-node/config.yml @@ -82,6 +82,7 @@    - role: nickhammond.logrotate    - role: openshift_manage_node      openshift_master_host: "{{ groups.oo_first_master.0 }}" +    when: not openshift_node_bootstrap | default(False)    tasks:    - name: Create group for deployment type      group_by: key=oo_nodes_deployment_type_{{ openshift.common.deployment_type }} | 
