Things
parent
01beed91ec
commit
8b3cb74e8f
|
@ -0,0 +1,22 @@
|
||||||
|
# ansible
|
||||||
|
|
||||||
|
Currently Ansible configurations for `ataraxia`, although if this goes well I'll bring it to Tycho/future devices. Please don't use :/
|
||||||
|
|
||||||
|
## Start
|
||||||
|
|
||||||
|
`sudo dnf install -y ansible`
|
||||||
|
|
||||||
|
- inventory: hosts file
|
||||||
|
- tasks: what playbook is going to do
|
||||||
|
- variables
|
||||||
|
- group_vars: groups of hosts
|
||||||
|
- host_vars: individual hosts
|
||||||
|
- `ansible-vault create/edit secret.yml`
|
||||||
|
- playbook: list of all tasks/roles Ansible must execute
|
||||||
|
- execute: `ansible-playbook run.yml -K --ask-vault-pass`
|
||||||
|
|
||||||
|
## S
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ansible-galaxy collection install ansible.posix
|
||||||
|
```
|
|
@ -0,0 +1,3 @@
|
||||||
|
[defaults]
|
||||||
|
inventory = hosts
|
||||||
|
transport = local
|
|
@ -0,0 +1 @@
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
- include_vars:
|
||||||
|
file: "{{ ansible_hostname }}.yml"
|
||||||
|
- include: selinux.yml
|
||||||
|
- include: packages.yml
|
||||||
|
- include: users.yml
|
|
@ -0,0 +1,29 @@
|
||||||
|
---
|
||||||
|
|
||||||
|
# - name: Configure repos
|
||||||
|
|
||||||
|
- name: Install essential packages
|
||||||
|
package:
|
||||||
|
name: "{{ packages }}"
|
||||||
|
state: latest
|
||||||
|
vars:
|
||||||
|
packages:
|
||||||
|
- htop
|
||||||
|
- neovim
|
||||||
|
- tmux
|
||||||
|
- zsh
|
||||||
|
|
||||||
|
# Hostname-specific package tasks
|
||||||
|
- include: hosts/{{ ansible_hostname }}.yml
|
||||||
|
|
||||||
|
- name: Install zoom
|
||||||
|
when: use_zoom | default(False)
|
||||||
|
dnf:
|
||||||
|
name: 'https://zoom.us/client/latest/zoom_x86_64.rpm'
|
||||||
|
disable_gpg_check: true
|
||||||
|
state: present
|
||||||
|
|
||||||
|
#- name: Install hostname-specific packages
|
||||||
|
# package:
|
||||||
|
# name: "{{ extra_packages }}"
|
||||||
|
# state: latest
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
- name: Set SELinux to permissive mode
|
||||||
|
ansible.posix.selinux:
|
||||||
|
policy: targeted
|
||||||
|
state: permissive
|
|
@ -0,0 +1 @@
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
---
|
||||||
|
- hosts: all
|
||||||
|
become: yes
|
||||||
|
roles:
|
||||||
|
- common
|
||||||
|
# tasks:
|
||||||
|
# - import_tasks: tasks/essential.yml
|
|
@ -0,0 +1,8 @@
|
||||||
|
|
||||||
|
- name: Install essential packages
|
||||||
|
package:
|
||||||
|
name: "{{ packages }}"
|
||||||
|
state: latest
|
||||||
|
|
||||||
|
# extra conf
|
||||||
|
- include: hosts/{{ ansible_hostname }}.yaml
|
|
@ -0,0 +1,4 @@
|
||||||
|
- name: Update packages
|
||||||
|
dnf:
|
||||||
|
name: "*"
|
||||||
|
state: latest
|
|
@ -0,0 +1 @@
|
||||||
|
use_zoom: true
|
Loading…
Reference in New Issue