This commit is contained in:
14
ansible/roles/common/tasks/darwin.yaml
Normal file
14
ansible/roles/common/tasks/darwin.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
- name: Install common packages
|
||||
become: true
|
||||
become_user: admin
|
||||
homebrew:
|
||||
state: present
|
||||
name:
|
||||
- btop
|
||||
- htop
|
||||
- rsync
|
||||
- rclone
|
||||
- vim
|
||||
- curl
|
||||
- arping
|
||||
|
||||
69
ansible/roles/common/tasks/linux.yaml
Normal file
69
ansible/roles/common/tasks/linux.yaml
Normal file
@@ -0,0 +1,69 @@
|
||||
- name: Install common packages
|
||||
apt:
|
||||
state: present
|
||||
name:
|
||||
- btop
|
||||
- htop
|
||||
- iotop
|
||||
- net-tools
|
||||
- tcpdump
|
||||
- curl
|
||||
- vim
|
||||
- rclone
|
||||
- rsync
|
||||
- borgmatic
|
||||
- cifs-utils
|
||||
- nfs-common
|
||||
- etckeeper
|
||||
- iputils-arping
|
||||
- bwm-ng
|
||||
- iftop
|
||||
|
||||
- name: Remove common packages
|
||||
apt:
|
||||
state: absent
|
||||
name:
|
||||
- salt-*
|
||||
|
||||
- name: Remove packages in VMs
|
||||
apt:
|
||||
state: absent
|
||||
purge: true
|
||||
name:
|
||||
- smartmontools
|
||||
- lm-sensors
|
||||
- ipmitools
|
||||
- openipmi
|
||||
when: ansible_facts['virtualization_role'] == "guest"
|
||||
|
||||
- name: Install packages on physical hosts
|
||||
apt:
|
||||
state: present
|
||||
name:
|
||||
- lm-sensors
|
||||
- hdparm
|
||||
when: ansible_facts['virtualization_role'] == "host"
|
||||
|
||||
- name: Update /etc/hosts
|
||||
lineinfile:
|
||||
path: /etc/hosts
|
||||
regexp: '^127\.0\.1\.1'
|
||||
line: 127.0.1.1 {{ ansible_nodename }}
|
||||
|
||||
- name: Kernel modules
|
||||
include_role:
|
||||
name: modules
|
||||
|
||||
- name: sudo for Linux
|
||||
include_role:
|
||||
name: sudo
|
||||
|
||||
#- name: autofs for Linux
|
||||
# include_role:
|
||||
# name: autofs
|
||||
#
|
||||
# Set vm.swappiness to 5 in /etc/sysctl.conf
|
||||
- sysctl:
|
||||
name: vm.swappiness
|
||||
value: '5'
|
||||
state: present
|
||||
6
ansible/roles/common/tasks/main.yaml
Normal file
6
ansible/roles/common/tasks/main.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
- name: Common Tasks for all hosts
|
||||
include_tasks: "{{ ansible_system | lower }}.yaml"
|
||||
|
||||
- name: Prometheus
|
||||
include_role:
|
||||
name: prometheus-node-exporter
|
||||
Reference in New Issue
Block a user