����JFIF���������
__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
---
- hosts: localhost
vars:
brand_domain: "{{ brand }}.com"
hostname: "{{ ansible_default_ipv4.address | regex_replace('\\.', '-') }}.{{ brand_domain }}"
cpanel_ns1: "ns1.{{ hostname }}"
cpanel_ns2: "ns2.{{ hostname }}"
connection: local
tasks:
- name: Set os_name
set_fact:
os_name: "{{ ansible_distribution | lower }}{{ ansible_distribution_major_version }}{{ ansible_distribution_minor_version | default('') }}"
- name: Setup resolv.conf
template: src=templates/resolv.conf.j2 dest=/etc/resolv.conf
- name: Setup yum cron
template:
src: templates/yum_cron.j2
dest: /etc/cron.d/yum
- name: Random Root Password
user:
name: root
password: "{{ lookup('password', '/dev/null chars=ascii_letters,digits length=30 encrypt=sha512_crypt') }}"
- name: Create .ssh dir
file:
path: /root/.ssh
state: directory
mode: 0700
- name: Ensure correct permissions on key
file:
path: /root/.ssh/authorized_keys
mode: 0600
ignore_errors: yes
- name: Setup static networking
nmcli:
type: ethernet
conn_name: ens3
ip4: "{{ ansible_default_ipv4.address }}/21"
gw4: "{{ ansible_default_ipv4.gateway }}"
state: present
when:
- ansible_distribution_major_version == '8' or ansible_distribution_major_version == '9' or ansible_distribution_major_version == '10'
- name: Setup static networking
template:
src: templates/ifcfg-eth0.j2
dest: /etc/sysconfig/network-scripts/ifcfg-eth0
when:
- ansible_distribution_major_version == '6' or ansible_distribution_major_version == '7'
- name: Check for cpanel
stat: path=/usr/local/cpanel
register: cpanel
- name: Call cpanel tasks
include_tasks: tasks/cpanel.yaml
when:
- cpanel.stat.exists == True
- name: Call plain tasks
include_tasks: tasks/plain.yaml
when:
- cpanel.stat.exists == False
- name: Check for plesk
stat: path=/usr/local/psa
register: plesk
- name: Call plesk tasks
include_tasks: tasks/plesk.yaml
when:
- plesk.stat.exists == True
- name: Call brand tasks
include_tasks: "tasks/{{ brand }}.yaml"
when:
- brand == "hostgator"
- cpanel.stat.exists == True
- ansible_distribution_major_version == '7'
- name: Include admin tools
include_tasks: "tasks/admin_tools.yaml"
when:
- brand == "hostgator" or brand == "bluehost"
- name: allow outbound ntp traffic in iptables
iptables:
chain: OUTPUT
protocol: udp
destination_port: 123
comment: "Outbound 123/udp for NTP"
jump: ACCEPT
- name: remove bandmin crons
lineinfile:
dest: /var/spool/cron/root
regexp: '(.*)bandmin(.*)'
state: absent
ignore_errors: yes
- name: Indicate done
file:
path: /root/.bootstrapped
state: touch
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| files | Folder | 0755 |
|
|
| roles | Folder | 0755 |
|
|
| tasks | Folder | 0755 |
|
|
| templates | Folder | 0755 |
|
|
| vars | Folder | 0755 |
|
|
| ansible.cfg | File | 614 B | 0644 |
|
| first_boot.yaml | File | 3.01 KB | 0664 |
|
| hosts | File | 1.15 KB | 0644 |
|
| recipe_ans.tar | File | 4.94 KB | 0664 |
|