|
|
# Check and synchronize the rsyslog server log directory permissions
|
|
|
# ansible 192.168.103.64 -m file -a "path=/Data/logs state=directory owner=yoholog group=yoholog mode=0755 recurse=yes"
|
|
|
|
|
|
- hosts: java-rsyslog
|
|
|
remote_user: root
|
|
|
tasks:
|
|
|
|
|
|
- name: Check the log server IP consistency for activity
|
|
|
rsyslog_check:
|
|
|
module_name: activity
|
|
|
service_ip: " {{ item }} "
|
|
|
system_name: yohobuy
|
|
|
with_items:
|
|
|
- "{{ groups['java-activity'] }}"
|
|
|
ignore_errors: yes
|
|
|
|
|
|
# - name: Check the log server IP consistency for yoho-bigdata
|
|
|
# rsyslog_check:
|
|
|
# module_name: yoho-bigdata
|
|
|
# service_ip: " {{ item }} "
|
|
|
# system_name: yohobuy
|
|
|
# with_items:
|
|
|
# - "{{ groups['java-bigdata'] }}"
|
|
|
# ignore_errors: yes
|
|
|
|
|
|
- name: Check the log server IP consistency for brower
|
|
|
rsyslog_check:
|
|
|
module_name: brower
|
|
|
service_ip: " {{ item }} "
|
|
|
system_name: yohobuy
|
|
|
with_items:
|
|
|
- "{{ groups['java-brower'] }}"
|
|
|
ignore_errors: yes
|
|
|
|
|
|
- name: Check the log server IP consistency for crm
|
|
|
rsyslog_check:
|
|
|
module_name: crm
|
|
|
service_ip: " {{ item }} "
|
|
|
system_name: yohobuy
|
|
|
with_items:
|
|
|
- "{{ groups['java-crm'] }}"
|
|
|
ignore_errors: yes
|
|
|
|
|
|
- name: Check the log server IP consistency for erp-gateway
|
|
|
rsyslog_check:
|
|
|
module_name: erp-gateway
|
|
|
service_ip: " {{ item }} "
|
|
|
system_name: yohobuy
|
|
|
with_items:
|
|
|
- "{{ groups['java-erpgateway'] }}"
|
|
|
ignore_errors: yes
|
|
|
|
|
|
# - name: Check the log server IP consistency for extendstore
|
|
|
# rsyslog_check:
|
|
|
# module_name: extendstore
|
|
|
# service_ip: " {{ item }} "
|
|
|
# system_name: yohobuy
|
|
|
# with_items:
|
|
|
# - "{{ groups['java-extendstore'] }}"
|
|
|
# ignore_errors: yes
|
|
|
|
|
|
- name: Check the log server IP consistency for gateway
|
|
|
rsyslog_check:
|
|
|
module_name: gateway
|
|
|
service_ip: " {{ item }} "
|
|
|
system_name: yohobuy
|
|
|
with_items:
|
|
|
- "{{ groups['java-gateway'] }}"
|
|
|
ignore_errors: yes
|
|
|
|
|
|
- name: Check the log server IP consistency for message
|
|
|
rsyslog_check:
|
|
|
module_name: message
|
|
|
service_ip: " {{ item }} "
|
|
|
system_name: yohobuy
|
|
|
with_items:
|
|
|
- "{{ groups['java-message'] }}"
|
|
|
ignore_errors: yes
|
|
|
|
|
|
- name: Check the log server IP consistency for yoho-message-controller
|
|
|
rsyslog_check:
|
|
|
module_name: message-center/yoho-message-controller
|
|
|
service_ip: " {{ item }} "
|
|
|
system_name: yohobuy
|
|
|
with_items:
|
|
|
- "{{ groups['java-messagecontroller'] }}"
|
|
|
ignore_errors: yes
|
|
|
|
|
|
- name: Check the log server IP consistency for nginx
|
|
|
rsyslog_check:
|
|
|
module_name: nginx-java
|
|
|
service_ip: " {{ item }} "
|
|
|
system_name: yohobuy
|
|
|
with_items:
|
|
|
- "{{ groups['java-nginx'] }}"
|
|
|
ignore_errors: yes
|
|
|
|
|
|
- name: Check the log server IP consistency for order
|
|
|
rsyslog_check:
|
|
|
module_name: order
|
|
|
service_ip: " {{ item }} "
|
|
|
system_name: yohobuy
|
|
|
with_items:
|
|
|
- "{{ groups['java-order'] }}"
|
|
|
ignore_errors: yes
|
|
|
|
|
|
- name: Check the log server IP consistency for platform-cms
|
|
|
rsyslog_check:
|
|
|
module_name: platform-cms
|
|
|
service_ip: " {{ item }} "
|
|
|
system_name: yohobuy
|
|
|
with_items:
|
|
|
- "{{ groups['java-platform-cms'] }}"
|
|
|
ignore_errors: yes
|
|
|
|
|
|
- name: Check the log server IP consistency for portal-gateway
|
|
|
rsyslog_check:
|
|
|
module_name: portal-gateway
|
|
|
service_ip: " {{ item }} "
|
|
|
system_name: yohobuy
|
|
|
with_items:
|
|
|
- "{{ groups['java-portal-gateway'] }}"
|
|
|
ignore_errors: yes
|
|
|
|
|
|
- name: Check the log server IP consistency for product
|
|
|
rsyslog_check:
|
|
|
module_name: product
|
|
|
service_ip: " {{ item }} "
|
|
|
system_name: yohobuy
|
|
|
with_items:
|
|
|
- "{{ groups['java-product'] }}"
|
|
|
ignore_errors: yes
|
|
|
|
|
|
- name: Check the log server IP consistency for promotion
|
|
|
rsyslog_check:
|
|
|
module_name: promotion
|
|
|
service_ip: " {{ item }} "
|
|
|
system_name: yohobuy
|
|
|
with_items:
|
|
|
- "{{ groups['java-promotion'] }}"
|
|
|
ignore_errors: yes
|
|
|
|
|
|
- name: Check the log server IP consistency for resources
|
|
|
rsyslog_check:
|
|
|
module_name: resources
|
|
|
service_ip: " {{ item }} "
|
|
|
system_name: yohobuy
|
|
|
with_items:
|
|
|
- "{{ groups['java-resources'] }}"
|
|
|
ignore_errors: yes
|
|
|
|
|
|
- name: Check the log server IP consistency for reviewed
|
|
|
rsyslog_check:
|
|
|
module_name: reviewed
|
|
|
service_ip: " {{ item }} "
|
|
|
system_name: yohobuy
|
|
|
with_items:
|
|
|
- "{{ groups['java-review'] }}"
|
|
|
ignore_errors: yes
|
|
|
|
|
|
# - name: Check the log server IP consistency for risk
|
|
|
# rsyslog_check:
|
|
|
# module_name: risk
|
|
|
# service_ip: " {{ item }} "
|
|
|
# system_name: yohobuy
|
|
|
# with_items:
|
|
|
# - "{{ groups['java-risk'] }}"
|
|
|
# ignore_errors: yes
|
|
|
|
|
|
- name: Check the log server IP consistency for shops
|
|
|
rsyslog_check:
|
|
|
module_name: shops
|
|
|
service_ip: " {{ item }} "
|
|
|
system_name: yohobuy
|
|
|
with_items:
|
|
|
- "{{ groups['java-shops'] }}"
|
|
|
ignore_errors: yes
|
|
|
|
|
|
- name: Check the log server IP consistency for sns
|
|
|
rsyslog_check:
|
|
|
module_name: sns
|
|
|
service_ip: " {{ item }} "
|
|
|
system_name: yohobuy
|
|
|
with_items:
|
|
|
- "{{ groups['java-sns'] }}"
|
|
|
ignore_errors: yes
|
|
|
|
|
|
# - name: Check the log server IP consistency for social
|
|
|
# rsyslog_check:
|
|
|
# module_name: social
|
|
|
# service_ip: " {{ item }} "
|
|
|
# system_name: yohobuy
|
|
|
# with_items:
|
|
|
# - "{{ groups['java-social'] }}"
|
|
|
# ignore_errors: yes
|
|
|
|
|
|
- name: Check the log server IP consistency for ufo-gateway
|
|
|
rsyslog_check:
|
|
|
module_name: ufo-gateway
|
|
|
service_ip: " {{ item }} "
|
|
|
system_name: yohobuy
|
|
|
with_items:
|
|
|
- "{{ groups['java-ufo-fore'] }}"
|
|
|
ignore_errors: yes
|
|
|
|
|
|
- name: Check the log server IP consistency for ufo-platform
|
|
|
rsyslog_check:
|
|
|
module_name: ufo-platform
|
|
|
service_ip: " {{ item }} "
|
|
|
system_name: yohobuy
|
|
|
with_items:
|
|
|
- "{{ groups['java-ufo-platform'] }}"
|
|
|
ignore_errors: yes
|
|
|
|
|
|
- name: Check the log server IP consistency for uic
|
|
|
rsyslog_check:
|
|
|
module_name: uic
|
|
|
service_ip: " {{ item }} "
|
|
|
system_name: yohobuy
|
|
|
with_items:
|
|
|
- "{{ groups['java-uic'] }}"
|
|
|
ignore_errors: yes
|
|
|
|
|
|
- name: Check the log server IP consistency for union
|
|
|
rsyslog_check:
|
|
|
module_name: union
|
|
|
service_ip: " {{ item }} "
|
|
|
system_name: yohobuy
|
|
|
with_items:
|
|
|
- "{{ groups['java-union'] }}"
|
|
|
ignore_errors: yes
|
|
|
|
|
|
- name: Check the log server IP consistency for users
|
|
|
rsyslog_check:
|
|
|
module_name: users
|
|
|
service_ip: " {{ item }} "
|
|
|
system_name: yohobuy
|
|
|
with_items:
|
|
|
- "{{ groups['java-users'] }}"
|
|
|
ignore_errors: yes
|
|
|
|
|
|
- name: Check the log server IP consistency for wechat
|
|
|
rsyslog_check:
|
|
|
module_name: wechat
|
|
|
service_ip: " {{ item }} "
|
|
|
system_name: yohobuy
|
|
|
with_items:
|
|
|
- "{{ groups['java-wechat'] }}"
|
|
|
ignore_errors: yes |
...
|
...
|
|