This commit is contained in:
parent
f6fc85fa7e
commit
5b89cfced5
@ -4,6 +4,10 @@
|
|||||||
- name: Ping hosts
|
- name: Ping hosts
|
||||||
ansible.builtin.ping:
|
ansible.builtin.ping:
|
||||||
|
|
||||||
|
- hosts: all
|
||||||
|
roles:
|
||||||
|
- common
|
||||||
|
|
||||||
- hosts: docker2.t-juice.club
|
- hosts: docker2.t-juice.club
|
||||||
roles:
|
roles:
|
||||||
- vault
|
- vault
|
||||||
|
3
project/roles/common/tasks/main.yml
Normal file
3
project/roles/common/tasks/main.yml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
- name: Ensure packages are installed
|
||||||
|
import_tasks: packages.yml
|
16
project/roles/common/tasks/packages.yml
Normal file
16
project/roles/common/tasks/packages.yml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
- name: Ensure common packages are installed
|
||||||
|
ansible.builtin.package:
|
||||||
|
name:
|
||||||
|
- zsh
|
||||||
|
- htop
|
||||||
|
- xfsprogs
|
||||||
|
- iotop
|
||||||
|
|
||||||
|
- name: Ensure debian-specific packages are installed
|
||||||
|
import_tasks: packages_debian.yml
|
||||||
|
when: ansible_facts['os-family']|lower == 'debian'
|
||||||
|
|
||||||
|
- name: Ensure rhel-specific packages are installed
|
||||||
|
import_tasks: packages_redhat.yml
|
||||||
|
when: ansible_facts['os-family']|lower == 'redhat'
|
6
project/roles/common/tasks/packages_debian.yml
Normal file
6
project/roles/common/tasks/packages_debian.yml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
- name: Ensure packages are installed
|
||||||
|
ansible.builtin.package:
|
||||||
|
name:
|
||||||
|
- vim
|
||||||
|
- xfsprogs
|
6
project/roles/common/tasks/packages_redhat.yml
Normal file
6
project/roles/common/tasks/packages_redhat.yml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
- name: Ensure packages are installed
|
||||||
|
ansible.builtin.package:
|
||||||
|
name:
|
||||||
|
- vim-enhanced
|
||||||
|
- yum-cron
|
Loading…
Reference in New Issue
Block a user