Skip to content

Commit

Permalink
Fix personium#150: Move common tasks to all hosts
Browse files Browse the repository at this point in the history
  • Loading branch information
tochi-y committed Mar 11, 2021
1 parent 0e72964 commit c1c431a
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 44 deletions.
1 change: 0 additions & 1 deletion 3-tier/ap.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Copyright FUJITSU LIMITED 2015-2017.

- include: ./common.yml
- include: ./tasks/common/config_cron.yml
- include: ./tasks/common/init_ebs_volume.yml
vars:
Expand Down
1 change: 0 additions & 1 deletion 3-tier/es.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Copyright FUJITSU LIMITED 2015-2017.

- include: ./common.yml
- include: ./tasks/common/config_cron.yml

- include: ./tasks/common/init_ebs_volume.yml
Expand Down
17 changes: 8 additions & 9 deletions 3-tier/init_personium.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
# Copyright FUJITSU LIMITED 2015-2017.

- hosts: tag_ServerType_bastion
connection: local
- hosts: all
become: yes
vars_files:
- ./group_vars/common.yml
- ./group_vars/bastion.yml
tasks:
- include: ./tasks/common/check_base_url.yml
- include: ./common.yml

- hosts: tag_ServerType_bastion
become: yes
vars_files:
- ./group_vars/bastion.yml
tasks:
- include: ./tasks/common/check_base_url.yml
- include: ./bastion.yml
handlers:
- include: ./handlers/common/restart_iptables.yml
Expand All @@ -18,7 +23,6 @@
- hosts: tag_ServerType_es
become: yes
vars_files:
- ./group_vars/common.yml
- ./group_vars/es.yml
tasks:
- include: ./es.yml
Expand All @@ -30,7 +34,6 @@
- hosts: tag_ServerType_nfs
become: yes
vars_files:
- ./group_vars/common.yml
- ./group_vars/nfs.yml
tasks:
- include: ./nfs.yml
Expand All @@ -42,7 +45,6 @@
- hosts: tag_ServerType_ap
become: yes
vars_files:
- ./group_vars/common.yml
- ./group_vars/ap.yml
tasks:
- include: ./ap.yml
Expand All @@ -54,7 +56,6 @@
- hosts: tag_ServerType_web
become: yes
vars_files:
- ./group_vars/common.yml
- ./group_vars/web.yml
tasks:
- include: ./web.yml
Expand All @@ -65,10 +66,8 @@
- web

- hosts: tag_ServerType_bastion
connection: local
become: yes
vars_files:
- ./group_vars/common.yml
- ./group_vars/bastion.yml
tasks:
- include: ./tasks/bastion/init_servicemanager.yml
Expand Down
1 change: 0 additions & 1 deletion 3-tier/nfs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Copyright FUJITSU LIMITED 2015-2017.

- include: ./common.yml
- include: ./tasks/common/config_cron.yml

- include: ./tasks/common/init_ebs_volume.yml
Expand Down
2 changes: 1 addition & 1 deletion 3-tier/static_inventory/hosts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ path_based_cell_url_enabled={Path_Based_Cell_Url_Enabled}

############ Setting items of bastion server ############
[tag_ServerType_bastion:vars]

ansible_connection=local


############ Setting items of Web server ############
Expand Down
1 change: 0 additions & 1 deletion 3-tier/web.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Copyright FUJITSU LIMITED 2015.

- include: ./common.yml
- include: ./tasks/common/config_cron.yml

- include: ./tasks/common/init_process_account_common.yml
Expand Down
29 changes: 4 additions & 25 deletions all-in-one/init_personium.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,26 @@
# Copyright FUJITSU LIMITED 2015-2017.

- hosts: tag_ServerType_bastion
connection: local
become: yes
vars_files:
- ./group_vars/common.yml
- ./group_vars/bastion.yml
tasks:
- include: ./tasks/common/check_base_url.yml
- include: ./common.yml
- include: ./bastion.yml
handlers:
- include: ./handlers/common/restart_firewalld.yml
tags:
- bastion_pre

- hosts: tag_ServerType_personium
connection: local
become: yes
vars_files:
- ./group_vars/common.yml
- ./group_vars/bastion.yml
- ./group_vars/es.yml
- ./group_vars/nfs.yml
- ./group_vars/ap.yml
- ./group_vars/web.yml
tasks:
- include: ./tasks/common/check_base_url.yml
- include: ./tasks/common/config_cron.yml
- include: ./common.yml
- include: ./bastion.yml tags=bastion_pre
- include: ./es.yml tags=es
- include: ./nfs.yml tags=nfs
- include: ./ap.yml tags=ap
- include: ./web.yml tags=web
- include: ./tasks/bastion/init_servicemanager.yml tags=bastion_post
handlers:
- include: ./handlers/common/restart_firewalld.yml
- include: ./handlers/web/reload_nginx.yml

- hosts: tag_ServerType_bastion
connection: local
become: yes
vars_files:
- ./group_vars/common.yml
- ./group_vars/bastion.yml
tasks:
- include: ./tasks/bastion/init_servicemanager.yml
tags:
- bastion_post
5 changes: 0 additions & 5 deletions all-in-one/static_inventory/hosts
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
############ Private IP Address of Bastion server ############
[tag_ServerType_bastion]
#Fill in the Private IP Address of Bastion server
127.0.0.1

############ Private IP Address of Personium server ############
[tag_ServerType_personium]
#Fill in the Private IP Address of Personium server
Expand Down

0 comments on commit c1c431a

Please sign in to comment.