Commit fd219f30 by ansible

no message

1 parent 5bbd6e46
---
- hosts: all
become: true
tasks:
- name: Create WDCHAT Directory Structure
file:
path: "{{ item.path }}"
owner: "{{ item.owner }}"
group: "{{ item.owner }}"
state: directory
with_items:
- { owner: root, path: /opt/stack }
- { owner: root, path: /home/chroot/wdftp }
- { owner: wildfly, path: /upload }
- { owner: wildfly, path: /archive }
- { owner: wildfly, path: /dmaimg }
- { owner: wildfly, path: /dmatmp }
\ No newline at end of file
---
- hosts: all
become: true
tasks:
- name: "Format disk: \"{{ item.device }}\" using etx4"
filesystem:
dev: "{{ item.device }}"
fstype: ext4
opts: -cc
with_items:
- { device: /dev/vdc1 }
- { device: /dev/vdc2 }
- { device: /dev/vdc3 }
---
- hosts: all
become: true
tasks:
- name: "Mount up \"{{ item.device }}\" to \"{{ item.path }}\""
mount:
state: mounted
fstype: ext4
src: "{{ item.device }}"
path: "{{ item.path }}"
with_items:
- { device: /dev/vdc1, path: /opt }
- { device: /dev/vdc2, path: /upload }
- { device: /dev/vdc3, path: /archive }
---
- hosts: all
become: true
tasks:
- name: Create partiton
parted:
device: "{{ item.device }}"
number: "{{ item.number }}"
part_end: "{{ item.end }}"
part_start: "{{ item.start }}"
state: present
# part_type: logical
with_items:
- { device: "/dev/vdc", number: "1", start: "0%", end: "50GiB" }
- { device: "/dev/vdc", number: "2", start: "51GiB", end: "100GiB" }
- { device: "/dev/vdc", number: "3", start: "101GiB", end: "100%" }
---
- hosts: all
become: true
tasks:
- name: Install required packages
apt: name={{ item }} state=present
with_items:
- sysstat
- gnuplot
- bc
- ntp
- jq
- parted
- python-pip
- python-dev
- build-essential
- plymouth
- plymouth-theme-edubuntu
- pip: name={{ item }} state=present
with_items:
- pip
- virtualenv
- pexpect
---
- hosts: all
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 }
- 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 }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!