Commit ba5b508d by ansible

no message

1 parent 8c311a59
......@@ -68,5 +68,5 @@
tasks:
- git:
repo: 'https://ansible@example.com/ansible/application.git'
dest: /tmp/dma.3.4.0/application
dest: /tmp/dma/3.4.0
version: dma.3.4.0
\ No newline at end of file
- name: Upload DMA Application Version {{ app_version }}
copy:
src: /tmp/dma/{{ app_version }}
dest: /tmp/application/
mode: 0744
- name: Upload Customer Configuration & Theme for {{ customer_name }}
copy:
src: /tmp/app-configuration/{{ customer_name }}
dest: /tmp/
mode: 0744
\ No newline at end of file
- name: Upload Application Version and Customer Configuration
import_tasks: apimanager.yml
when: app_name == 'apimanager'
- import_tasks: dma.yml
when: app_name == 'dma'
- import_tasks: wdchat.yml
when: app_name == 'wdchat'
- name: Upload DMA Application Version {{ app_version }}
copy:
src: /tmp/dma/{{ app_version }}
dest: /tmp/application/
mode: 0744
- name: Upload Customer Configuration & Theme for {{ customer_name }}
copy:
src: /tmp/app-configuration/{{ customer_name }}
dest: /tmp/
mode: 0744
\ No newline at end of file
---
- hosts: NewServer, new_server_builder_1
become: true
tasks:
- import_role:
name: upload
---
- hosts: 03_new-host
become: true
tasks:
- name: Create Groups
group:
gid: "{{ item.gid }}"
name: "{{ item.name }}"
state: present
with_items:
- { gid: 1010, name: wdview }
- { gid: 1001, name: wdadmin }
- { gid: 1009, name: wdftp }
- { gid: 996, name: nginx }
- { gid: 999, name: wildfly }
- { gid: 998, name: postgres }
- { gid: 997, name: mongodb }
- { gid: 995, name: mosquitto }
- name: Create Users
user:
uid: "{{ item.uid }}"
home: "{{ item.path }}"
name: "{{ item.name }}"
group: "{{ item.name }}"
shell: "{{ item.shell }}"
system: "{{ item.system }}"
createhome: "{{ item.crehome }}"
with_items:
- { uid: 1010, name: wdview, crehome: yes, system: no, shell: /bin/bash, path: /home/wdview }
- { uid: 1001, name: wdadmin, crehome: yes, system: no, shell: /bin/bash, path: /home/wdadmin }
- { uid: 999, name: wildfly, crehome: no, system: yes, shell: /bin/bash, path: /opt/stack/wildfly }
- { uid: 1009, name: wdftp, crehome: yes, system: no, shell: /usr/sbin/nologin, path: /archive }
- { uid: 996, name: nginx, crehome: no, system: yes, shell: /usr/sbin/nologin, path: /opt/stack/nginx }
- { uid: 998, name: postgres, crehome: no, system: yes, shell: /bin/bash, path: /opt/stack/postgres }
- { uid: 997, name: mongodb, crehome: no, system: yes, shell: /bin/bash, path: /opt/stack/mongodb }
- { uid: 995, name: mosquitto, crehome: no, system: yes, shell: /bin/bash, path: /opt/stack/mqtt }
- name: Allow 'wildfly' group to have passwordless sudo
lineinfile:
dest: /etc/sudoers
state: present
regexp: '^%wildfly'
line: '%wildfly ALL=(ALL) NOPASSWD: ALL'
validate: 'visudo -cf %s'
---
- hosts: NewServer
- hosts: NewServer, new_server_builder_1
become: true
tasks:
- import_role:
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!