Commit 695e13c8 by ansible

delete unused playbook

1 parent 660ade11
---
- hosts: 03_new-host
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/dma/conf }
- { owner: root, path: /home/chroot/wdftp }
- { owner: root, path: /data }
- { owner: wildfly, path: /upload }
- { owner: wildfly, path: /archive }
- { owner: wildfly, path: /dmaimg }
- { owner: wildfly, path: /dmatmp }
\ No newline at end of file
---
- hosts: NewServer
become: true
tasks:
- import_role:
name: directory
---
- hosts: 02_vdc-disk
become: true
tasks:
- name: "Format disk: \"{{ item.device }}\" using etx4"
filesystem:
dev: "{{ item.device }}"
fstype: ext4
with_items:
- { device: /dev/vdc1 }
- { device: /dev/vdc2 }
- { device: /dev/vdc3 }
- { device: /dev/vdc4 }
- hosts: 02_sdb-disk
become: true
tasks:
- name: "Format disk: \"{{ item.device }}\" using etx4"
filesystem:
dev: "{{ item.device }}"
fstype: ext4
with_items:
- { device: /dev/sdb1 }
- { device: /dev/sdb2 }
- { device: /dev/sdb3 }
- { device: /dev/sdb4 }
- hosts: 02_vdb-disk
become: true
tasks:
- name: "Format disk: \"{{ item.device }}\" using etx4"
filesystem:
dev: "{{ item.device }}"
fstype: ext4
with_items:
- { device: /dev/vdb1 }
- { device: /dev/vdb2 }
- { device: /dev/vdb3 }
- { device: /dev/vdb4 }
---
- hosts: NewServer
become: true
tasks:
- import_role:
name: formatpartition
\ No newline at end of file
---
- hosts: 03_new-host
become: true
tasks:
- name: Hardening Ubuntu OS Disable IPv6
sysctl:
name: "{{ item.parameter }}"
state: present
value: "{{ item.value }}"
with_items:
- { parameter: net.ipv6.conf.all.disable_ipv6, value: 1 }
- { parameter: net.ipv6.conf.default.disable_ipv6, value: 1 }
- { parameter: net.ipv6.conf.lo.disable_ipv6, value: 1 }
- name: Hardening Ubuntu OS IP Spoofing protection
sysctl:
name: "{{ item.parameter }}"
state: present
value: "{{ item.value }}"
with_items:
- { parameter: net.ipv4.conf.all.rp_filter, value: 1 }
- { parameter: net.ipv4.conf.default.rp_filter, value: 1 }
- name: Hardening Ubuntu OS Block SYN attacks
sysctl:
name: "{{ item.parameter }}"
state: present
value: "{{ item.value }}"
with_items:
- { parameter: net.ipv4.tcp_syncookies, value: 1 }
- { parameter: net.ipv4.tcp_max_syn_backlog, value: 2048 }
- { parameter: net.ipv4.tcp_synack_retries, value: 2 }
- { parameter: net.ipv4.tcp_syn_retries, value: 5 }
- name: Hardening Ubuntu OS Ignore send redirects
sysctl:
name: "{{ item.parameter }}"
state: present
value: "{{ item.value }}"
with_items:
- { parameter: net.ipv4.conf.all.send_redirects, value: 0 }
- { parameter: net.ipv4.conf.default.send_redirects, value: 0 }
- name: Hardening Ubuntu OS Log Martians
sysctl:
name: "{{ item.parameter }}"
state: present
value: "{{ item.value }}"
with_items:
- { parameter: net.ipv4.conf.all.log_martians, value: 1 }
- { parameter: net.ipv4.icmp_ignore_bogus_error_responses, value: 1 }
\ No newline at end of file
---
- hosts: NewServer
become: true
tasks:
- import_role:
name: hardening
\ No newline at end of file
---
- hosts: NewServer
become: true
tasks:
- import_role:
name: loadstack
\ No newline at end of file
---
- hosts: 02_vdc-disk
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 }
- { device: /dev/vdc4, path: /data }
- hosts: 02_sdb-disk
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/sdb1, path: /opt }
- { device: /dev/sdb2, path: /upload }
- { device: /dev/sdb3, path: /archive }
- { device: /dev/sdb4, path: /data }
- hosts: 02_vdb-disk
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/vdb1, path: /opt }
- { device: /dev/vdb2, path: /upload }
- { device: /dev/vdb3, path: /archive }
- { device: /dev/vdb4, path: /data }
---
- hosts: NewServer
become: true
tasks:
- import_role:
name: mountpartition
\ No newline at end of file
---
- hosts: NewServer
become: true
tasks:
- import_role:
name: partition
\ No newline at end of file
---
- hosts: 02_vdc-disk
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: "40%" }
- { device: "/dev/vdc", number: "2", start: "41%", end: "80%" }
- { device: "/dev/vdc", number: "3", start: "81%", end: "90%" }
- { device: "/dev/vdc", number: "4", start: "91%", end: "100%" }
- hosts: 02_sdb-disk
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/sdb", number: "1", start: "0%", end: "40%" }
- { device: "/dev/sdb", number: "2", start: "41%", end: "80%" }
- { device: "/dev/sdb", number: "3", start: "81%", end: "90%" }
- { device: "/dev/sdb", number: "4", start: "91%", end: "100%" }
- hosts: 02_vdb-disk
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/vdb", number: "1", start: "0%", end: "40%" }
- { device: "/dev/vdb", number: "2", start: "41%", end: "80%" }
- { device: "/dev/vdb", number: "3", start: "81%", end: "90%" }
- { device: "/dev/vdb", number: "4", start: "91%", end: "100%" }
---
- hosts: 03_new-host
become: true
tasks:
- name: Run the equivalent of "apt-get update" as a separate step
apt:
update_cache: yes
- name: Install required packages
apt: name={{ item }} state=present
with_items:
- sysstat
- gnuplot
- bc
- ntp
- jq
- parted
- python3-pip
- python-dev
- build-essential
- plymouth
- plymouth-theme-edubuntu
- pip: name={{ item }} state=present
with_items:
- virtualenv
- pexpect
- pymongo
- git:
repo: 'https://ansible@example.com/ansible/software.git'
dest: /tmp/source
- copy:
src: /tmp/source
dest: /tmp
mode: 0755
- git:
repo: 'https://ansible@example.com/ansible/software-configuration.git'
dest: /tmp/configuration
version: develop
- copy:
src: /tmp/configuration
dest: /tmp
mode: 0711
- name: Load software stack based on Application Name
import_tasks: apimanager.yml
when: app_name == 'apimanager'
- import_tasks: dma.yml
when: app_name == 'dma'
- import_tasks: wdchat.yml
when: app_name == 'wdchat'
- git:
repo: 'https://ansible@example.com/ansible/software.git'
dest: /tmp/source
- copy:
src: /tmp/source
dest: /tmp
mode: 0755
- git:
repo: 'https://ansible@example.com/ansible/software-configuration.git'
dest: /tmp/configuration
version: develop
- copy:
src: /tmp/configuration
dest: /tmp
mode: 0711
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!