Browse Source

Merge pull request #562 from sakshiarora13/role_fixes

Issue #560: Remove files and vars not in use from control_plane.yml
Lucas A. Wilson 3 years ago
parent
commit
c0d9f38db6

+ 2 - 1
control_plane/control_plane.yml

@@ -25,4 +25,5 @@
     - control_plane_ib
     - control_plane_sm
     - control_plane_customiso
-    - control_plane_repo
+    - control_plane_repo
+    - deploy_job_templates

+ 2 - 1
control_plane/ethernet.yml

@@ -21,5 +21,6 @@
     - dellemc.os10
    vars:
      ansible_network_os: dellemc.os10.os10
+     ansible_command_timeout: 180
    roles:
-    - network_ethernet
+    - network_ethernet

+ 2 - 2
control_plane/roles/control_plane_sm/tasks/create_pod.yml

@@ -43,7 +43,7 @@
       replace:
         path: "{{ sm_kube_config_file }}"
         regexp: "          image:.*"
-        replace: "          image: 'localhost/{{sm_docker_image_name}}:{{ sm_docker_image_tag }}'"
+        replace: "          image: 'localhost/{{ sm_docker_image_name }}:{{ sm_docker_image_tag }}'"
       tags: install
 
     - name: Replace cache directory in sm config file
@@ -64,4 +64,4 @@
       command: "kubectl apply -f {{ sm_kube_config_file }}"
       tags: install
 
-  when: "'subnet-manager' not in k8s_pods.stdout"
+  when: "'subnet-manager' not in k8s_pods.stdout"

+ 2 - 1
control_plane/roles/control_plane_sm/tasks/pre_requisites.yml

@@ -45,5 +45,6 @@
   copy:
     src: "{{ opensm_conf_file }}"
     dest: "{{ opensm_conf_file_dest }}"
+    mode: preserve
     force: yes
-  tags: install
+  tags: install

+ 0 - 1
control_plane/roles/control_plane_sm/vars/main.yml

@@ -25,4 +25,3 @@ sm_docker_image_tag: latest
 #Usage: create_pod.yml
 sm_container_name: opensm-container
 sm_kube_config_file: "{{ role_path }}/files/k8s_sm.yml"
-opensm_conf_file: "{{ role_path }}/../../input_params/opensm.conf"

+ 0 - 44
control_plane/roles/webui_awx/tasks/check_awx_status.yml

@@ -1,44 +0,0 @@
-# Copyright 2020 Dell Inc. or its subsidiaries. All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
----
-
-#Tasks for verifying if AWX is already installed on the system
-- name: Initialize variables
-  set_fact:
-    awx_status: false
-  tags: install
-
-- name: Check awx_task status on the machine
-  docker_container_info:
-    name: awx_task
-  register: awx_task_result
-  tags: install
-  vars:
-    ansible_python_interpreter: "/usr/bin/python3"
-
-- name: Check awx_web status on the machine
-  docker_container_info:
-    name: awx_web
-  register: awx_web_result
-  tags: install
-  vars:
-    ansible_python_interpreter: "/usr/bin/python3"
-
-- name: Update awx status
-  set_fact:
-    awx_status: true
-  when:
-    - awx_task_result.exists
-    - awx_web_result.exists
-  tags: install

+ 0 - 22
control_plane/roles/webui_awx/tasks/clone_awx.yml

@@ -1,22 +0,0 @@
-# Copyright 2020 Dell Inc. or its subsidiaries. All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
----
-
-- name: Clone AWX repo
-  git:
-    repo: "{{ awx_git_repo }}"
-    dest: "{{ awx_repo_path }}"
-    force: yes
-    version: 15.0.0
-  tags: install

+ 0 - 40
control_plane/roles/webui_awx/tasks/firewall_settings.yml

@@ -1,40 +0,0 @@
-# Copyright 2020 Dell Inc. or its subsidiaries. All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
----
-
-#Tasks for modifying firewall configurations for AWX
-
-- name: Masquerading on public zone
-  firewalld:
-    masquerade: yes
-    state: enabled
-    permanent: 'true'
-    zone: public
-  tags: install
-
-- name: Add HTTP and HTTPS services to firewalld
-  firewalld:
-    service: "{{ item }}"
-    permanent: true
-    state: enabled
-  with_items:
-    - http
-    - https
-  tags: install
-
-- name: Reboot firewalld
-  systemd:
-    name: firewalld
-    state: reloaded
-  tags: install

+ 0 - 34
control_plane/roles/webui_awx/tasks/install_awx_cli.yml

@@ -1,34 +0,0 @@
-# Copyright 2020 Dell Inc. or its subsidiaries. All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
----
-
-# Tasks for installing AWX-CLI
-- name: Add AWX CLI repo
-  block:
-    - name: Get repo
-      get_url:
-        url: "{{ awx_cli_repo }}"
-        dest: "{{ awx_cli_repo_path }}"
-    - name: Disable gpgcheck
-      replace:
-        path: "{{ awx_cli_repo_path }}"
-        regexp: 'gpgcheck=1'
-        replace: 'gpgcheck=0'
-  tags: install
-
-- name: Install AWX-CLI
-  package:
-    name: ansible-tower-cli
-    state: present
-  tags: install

+ 0 - 85
control_plane/roles/webui_awx/tasks/ui_accessibility.yml

@@ -1,85 +0,0 @@
-# Copyright 2020 Dell Inc. or its subsidiaries. All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
----
-
-# Check accessibility of AWX-UI
-- name: Re-install if in migrating state
-  block:
-    - name: Wait for AWX UI to be up
-      uri:
-        url: "{{ awx_ip }}"
-        status_code: "{{ return_status }}"
-        return_content: yes
-      register: register_error
-      until: awx_ui_msg in register_error.content
-      retries: 20
-      delay: 15
-      changed_when: no
-      no_log: True
-
-  rescue:
-    - name: Starting rescue
-      debug:
-        msg: "Attempting to re-install AWX"
-
-    - name: Remove old containers
-      docker_container:
-        name: "{{ item }}"
-        state: absent
-      loop:
-        - awx_task
-        - awx_web
-
-    - name: Restart docker
-      service:
-        name: docker
-        state: restarted
-
-    - name: Re-install AWX
-      block:
-        - name: Run AWX install.yml file
-          command: ansible-playbook -i inventory install.yml --extra-vars "admin_password={{ admin_password }}"
-          args:
-            chdir: "{{ awx_installer_path }}"
-          register: awx_installation
-          no_log: True
-
-      rescue:
-        - name: Check AWX status on machine
-          include_tasks: check_awx_status.yml
-
-        - name: Fail if container are not running
-          fail:
-            msg: "AWX installation failed with error msg:
-             {{ awx_installation.stdout | regex_replace(admin_password) }}."
-          when: not awx_status
-
-    - name: Check if AWX UI is up
-      block:
-        - name: Wait for AWX UI to be up
-          uri:
-            url: "{{ awx_ip }}"
-            status_code: "{{ return_status }}"
-            return_content: yes
-          register: register_error
-          until: awx_ui_msg in register_error.content
-          retries: 240
-          delay: 15
-          changed_when: no
-          no_log: True
-      rescue:
-        - name: Message
-          fail:
-            msg: "{{ register_error | regex_replace(awx_user) | regex_replace(admin_password) }}"
-  tags: install