Skip to content

Commit

Permalink
[CE-414]Remove deprecated methods in playbooks
Browse files Browse the repository at this point in the history
Change-Id: Idf3216687b9b114588875cc184877e4d4a60aded
Signed-off-by: Tong Li <litong01@us.ibm.com>
  • Loading branch information
Tong Li committed Jul 12, 2018
1 parent d9e4e28 commit 33087f1
Show file tree
Hide file tree
Showing 31 changed files with 133 additions and 121 deletions.
6 changes: 3 additions & 3 deletions src/agent/ansible/aws.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@
vars:
env: "aws"
cloud_type: "aws"
include: "roles/cloud_aws/plays.yml"
import_playbook: "roles/cloud_aws/plays.yml"

- name: Run the plays
vars:
env: "aws"
env_type: "flanneld"
include: "roles/env_flanneld/{{ mode }}.yml"
import_playbook: "roles/env_flanneld/{{ mode }}.yml"

- name: Run the plays
vars:
env: "bc1st"
deploy_type: "compose"
include: "roles/deploy_compose/plays.yml"
import_playbook: "roles/deploy_compose/plays.yml"

- name: Inform the installer
hosts: cloud
Expand Down
6 changes: 3 additions & 3 deletions src/agent/ansible/awsk8s.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@
vars:
env: "aws"
cloud_type: "aws"
include: "roles/cloud_aws/plays.yml"
import_playbook: "roles/cloud_aws/plays.yml"

- name: Run the plays
vars:
env: "aws"
env_type: "k8s"
include: "roles/env_k8s/{{ mode }}.yml"
import_playbook: "roles/env_k8s/{{ mode }}.yml"

- name: Run the plays
vars:
env: "bc1st"
deploy_type: "k8s"
include: "roles/deploy_k8s/plays.yml"
import_playbook: "roles/deploy_k8s/plays.yml"

- name: Inform the installer
hosts: cloud
Expand Down
6 changes: 3 additions & 3 deletions src/agent/ansible/azureyml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@
vars:
env: "azure"
cloud_type: "azure"
include: "roles/cloud_azure/plays.yml"
import_playbook: "roles/cloud_azure/plays.yml"

- name: Run the plays
vars:
env: "azure"
env_type: "k8s"
include: "roles/env_k8s/plays.yml"
import_playbook: "roles/env_k8s/plays.yml"

- name: Run the plays
vars:
env: "bc1st"
deploy_type: "k8s"
include: "roles/deploy_k8s/plays.yml"
import_playbook: "roles/deploy_k8s/plays.yml"

- name: Inform the installer
hosts: cloud
Expand Down
2 changes: 1 addition & 1 deletion src/agent/ansible/initcluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
starttime: "{{ ansible_date_time }}"

- name: Run the plays
include: "roles/env_{{ env_type | default('flanneld') }}/{{ mode }}.yml"
import_playbook: "roles/env_{{ env_type | default('flanneld') }}/{{ mode }}.yml"

- name: inform the installer
hosts: cloud
Expand Down
6 changes: 3 additions & 3 deletions src/agent/ansible/os.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@
vars:
env: "os"
cloud_type: "os"
include: "roles/cloud_os/plays.yml"
import_playbook: "roles/cloud_os/plays.yml"

- name: Run the plays
vars:
env: "os"
env_type: "flanneld"
include: "roles/env_flanneld/{{ mode }}.yml"
import_playbook: "roles/env_flanneld/{{ mode }}.yml"

- name: Run the plays
vars:
env: "bc1st"
deploy_type: "compose"
include: "roles/deploy_compose/plays.yml"
import_playbook: "roles/deploy_compose/plays.yml"

- name: Inform the installer
hosts: cloud
Expand Down
6 changes: 3 additions & 3 deletions src/agent/ansible/osk8s.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@
vars:
env: "os"
cloud_type: "os"
include: "roles/cloud_os/plays.yml"
import_playbook: "roles/cloud_os/plays.yml"

- name: Run the plays
vars:
env: "os"
env_type: "k8s"
include: "roles/env_k8s/{{ mode }}.yml"
import_playbook: "roles/env_k8s/{{ mode }}.yml"

- name: Run the plays
vars:
env: "bc1st"
deploy_type: "k8s"
include: "roles/deploy_k8s/plays.yml"
import_playbook: "roles/deploy_k8s/plays.yml"

- name: Inform the installer
hosts: cloud
Expand Down
2 changes: 1 addition & 1 deletion src/agent/ansible/provcluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
starttime: "{{ ansible_date_time }}"

- name: Run the plays
include: "roles/cloud_{{ cloud_type | default('os') }}/plays.yml"
import_playbook: "roles/cloud_{{ cloud_type | default('os') }}/plays.yml"

- name: Inform the installer
hosts: cloud
Expand Down
8 changes: 4 additions & 4 deletions src/agent/ansible/roles/cloud_aws/plays.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
vars_files:
- "./../../vars/{{ env }}.yml"
tasks:
- include: "prepare/tasks/{{ mode }}.yml"
- include_tasks: "prepare/tasks/{{ mode }}.yml"
tags: "prepare"

- name: provision servers
Expand All @@ -15,7 +15,7 @@
vars_files:
- "{{ playbook_dir }}/../../vars/{{ env }}.yml"
tasks:
- include: "provision/tasks/{{ mode }}.yml"
- include_tasks: "provision/tasks/{{ mode }}.yml"
tags: "provision"

- name: Post provision process
Expand All @@ -24,7 +24,7 @@
vars_files:
- "{{ playbook_dir }}/../../vars/{{ env }}.yml"
tasks:
- include: "postprovision/tasks/{{ mode }}.yml"
- include_tasks: "postprovision/tasks/{{ mode }}.yml"
tags: "postprovision"

- name: change /etc/hosts files so that each node knows other nodes
Expand All @@ -36,5 +36,5 @@
vars_files:
- "{{ playbook_dir }}/../../vars/{{ env }}.yml"
tasks:
- include: "../cloud_os/namenode/tasks/{{ mode }}.yml"
- include_tasks: "../cloud_os/namenode/tasks/{{ mode }}.yml"
tags: "namenode"
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
- include: ../../../cloud_os/postprovision/tasks/apply.yml
- include_tasks: ../../../cloud_os/postprovision/tasks/apply.yml
8 changes: 4 additions & 4 deletions src/agent/ansible/roles/cloud_azure/plays.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
vars_files:
- "./../../vars/{{ env }}.yml"
tasks:
- include: "prepare/tasks/{{ mode }}.yml"
- include_tasks: "prepare/tasks/{{ mode }}.yml"
tags: "prepare"

- name: provision servers
Expand All @@ -15,7 +15,7 @@
vars_files:
- "{{ playbook_dir }}/../../vars/{{ env }}.yml"
tasks:
- include: "provision/tasks/{{ mode }}.yml"
- include_tasks: "provision/tasks/{{ mode }}.yml"
tags: "provision"

- name: Post provision process
Expand All @@ -24,7 +24,7 @@
vars_files:
- "{{ playbook_dir }}/../../vars/{{ env }}.yml"
tasks:
- include: "postprovision/tasks/{{ mode }}.yml"
- include_tasks: "postprovision/tasks/{{ mode }}.yml"
tags: "postprovision"

- name: change /etc/hosts files so that each node knows other nodes
Expand All @@ -36,5 +36,5 @@
vars_files:
- "{{ playbook_dir }}/../../vars/{{ env }}.yml"
tasks:
- include: "../cloud_os/namenode/tasks/{{ mode }}.yml"
- include_tasks: "../cloud_os/namenode/tasks/{{ mode }}.yml"
tags: "namenode"
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
- include: ../../../cloud_os/postprovision/tasks/apply.yml
- include_tasks: ../../../cloud_os/postprovision/tasks/apply.yml
8 changes: 4 additions & 4 deletions src/agent/ansible/roles/cloud_os/plays.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
vars_files:
- "./../../vars/{{ env }}.yml"
tasks:
- include: "prepare/tasks/{{ mode }}.yml"
- include_tasks: "prepare/tasks/{{ mode }}.yml"
tags: "prepare"

- name: provision servers
Expand All @@ -15,7 +15,7 @@
vars_files:
- "{{ playbook_dir }}/../../vars/{{ env }}.yml"
tasks:
- include: "provision/tasks/{{ mode }}.yml"
- include_tasks: "provision/tasks/{{ mode }}.yml"
tags: "provision"

- name: Post provision process
Expand All @@ -24,7 +24,7 @@
vars_files:
- "{{ playbook_dir }}/../../vars/{{ env }}.yml"
tasks:
- include: "postprovision/tasks/{{ mode }}.yml"
- include_tasks: "postprovision/tasks/{{ mode }}.yml"
tags: "postprovision"

- name: change /etc/hosts files so that each node knows other nodes
Expand All @@ -36,5 +36,5 @@
vars_files:
- "{{ playbook_dir }}/../../vars/{{ env }}.yml"
tasks:
- include: "namenode/tasks/{{ mode }}.yml"
- include_tasks: "namenode/tasks/{{ mode }}.yml"
tags: "namenode"
14 changes: 7 additions & 7 deletions src/agent/ansible/roles/cloud_vb/plays.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
vars_files:
- "./../../vars/{{ env }}.yml"
tasks:
- include: "prepare/tasks/main.yml"
- include_tasks: "prepare/tasks/main.yml"
tags: "prepare"

- name: provision servers
Expand All @@ -14,7 +14,7 @@
vars_files:
- "{{ playbook_dir }}/../../vars/{{ env }}.yml"
tasks:
- include: "provision/tasks/{{ mode }}.yml"
- include_tasks: "provision/tasks/{{ mode }}.yml"
tags: "provision"

- name: Generate runhost file
Expand All @@ -23,7 +23,7 @@
vars_files:
- "./../../vars/{{ env }}.yml"
tasks:
- include: "wait/tasks/{{ mode }}.yml"
- include_tasks: "wait/tasks/{{ mode }}.yml"
tags: "wait"

- name: Get VM IP addresses
Expand All @@ -33,7 +33,7 @@
vars_files:
- "{{ playbook_dir }}/../../vars/{{ env }}.yml"
tasks:
- include: "netprocess/tasks/{{ mode }}.yml"
- include_tasks: "netprocess/tasks/{{ mode }}.yml"
tags: "netprocess"

- name: Generate runhost file
Expand All @@ -42,7 +42,7 @@
vars_files:
- "./../../vars/{{ env }}.yml"
tasks:
- include: "post/tasks/{{ mode }}.yml"
- include_tasks: "post/tasks/{{ mode }}.yml"
tags: "post"

- name: Setup hostname and static node names
Expand All @@ -54,7 +54,7 @@
vars_files:
- "{{ playbook_dir }}/../../vars/{{ env }}.yml"
tasks:
- include: "namenode/tasks/{{ mode }}.yml"
- include_tasks: "namenode/tasks/{{ mode }}.yml"
tags: "namenode"

- name: Setup certificates for ssh access
Expand All @@ -64,5 +64,5 @@
vars_files:
- "{{ playbook_dir }}/../../vars/{{ env }}.yml"
tasks:
- include: "addcert/tasks/{{ mode }}.yml"
- include_tasks: "addcert/tasks/{{ mode }}.yml"
tags: "addcert"
Loading

0 comments on commit 33087f1

Please sign in to comment.