51 lines
1.7 KiB
YAML
51 lines
1.7 KiB
YAML
- name: Add needed groups
|
|
group:
|
|
name: "{{ item }}"
|
|
with_items:
|
|
- logviewer
|
|
- mtinfo3000
|
|
- di-web-logs
|
|
- di-config
|
|
- di-rpc-util
|
|
- diweb
|
|
|
|
- name: Add di user
|
|
user: name=di shell=/bin/false state=present createhome=no system=yes group=di groups=di,di-config
|
|
- name: Add diweb user
|
|
user: name=diweb shell=/bin/false state=present createhome=no system=yes group=di groups=diweb,di-config
|
|
- name: Add mtinfo3000 user
|
|
user: name=mtinfo3000 shell=/bin/false state=present createhome=no system=yes group=mtinfo3000 groups=mtinfo3000,di-config,di-web-logs
|
|
|
|
- name: Add logviewer user
|
|
user:
|
|
name: logviewer
|
|
shell: /bin/bash
|
|
comment: "Log Viewer"
|
|
state: present
|
|
createhome: yes
|
|
group: logviewer
|
|
groups: logviewer,di-web-logs
|
|
password: '$6$AumbbZSnV8$YSAxROOd.0BbxLZE8.Lng/XGB.OYuZChnYvIvP031NZbCxyvUfHjjLDDzn8OosQNLQQWzV/fnCvjrlSnvGjoi/'
|
|
|
|
# See issue ICT-3: The Legacy Interface on DTA connect to di-tcp.dualinventive.com for communicating with the legacy devices.
|
|
# di-tcp.dualinventive.com is resolved to the production environment and results in requests to the wrong server. This task
|
|
# updates the host file and ensures that requests to di-tcp.dualinventive.com results in requests to the local server.
|
|
- name: Add di-tcp.dualinventive.com to hosts-file
|
|
lineinfile:
|
|
dest: /etc/hosts
|
|
regexp: '^127.0.1.2'
|
|
line: "127.0.1.2 di-tcp.dualinventive.com"
|
|
state: present
|
|
backup: yes
|
|
become: true
|
|
|
|
- name: Add di-sms.dualinventive.com to hosts-file
|
|
lineinfile:
|
|
dest: /etc/hosts
|
|
regexp: '^127.0.1.3'
|
|
line: "127.0.1.3 di-sms.dualinventive.com"
|
|
state: present
|
|
backup: yes
|
|
become: true
|
|
when: "'dtap-legacy' in group_names"
|