mirror of
https://github.com/fscotto/infra.git
synced 2026-05-30 15:39:58 +00:00
Add initial Ubuntu workstation orchestration
This commit is contained in:
@@ -1 +1,9 @@
|
||||
# variables for Ubuntu hosts
|
||||
---
|
||||
ubuntu_packages_base:
|
||||
- ca-certificates
|
||||
- curl
|
||||
- gpg
|
||||
- python3-apt
|
||||
- python3-gi
|
||||
- python3-gi-cairo
|
||||
- software-properties-common
|
||||
|
||||
@@ -1 +1,17 @@
|
||||
# workstation profile variables
|
||||
---
|
||||
profile_packages:
|
||||
- dbus-user-session
|
||||
- gnome-keyring
|
||||
- gnome-shell-extension-manager
|
||||
- gnome-shell-extensions
|
||||
- gnome-terminal
|
||||
- gnome-tweaks
|
||||
- seahorse
|
||||
|
||||
workstation_user_directories:
|
||||
- path: "{{ user_home }}/.config"
|
||||
mode: "0755"
|
||||
- path: "{{ user_home }}/.local"
|
||||
mode: "0755"
|
||||
- path: "{{ user_home }}/.local/bin"
|
||||
mode: "0755"
|
||||
|
||||
@@ -1 +1,5 @@
|
||||
# deadalus specific variables
|
||||
---
|
||||
hostname: deadalus
|
||||
|
||||
host_packages: []
|
||||
host_enabled_services: []
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
---
|
||||
all:
|
||||
children:
|
||||
void:
|
||||
@@ -14,6 +15,19 @@ all:
|
||||
nymph:
|
||||
ansible_connection: local
|
||||
|
||||
ubuntu:
|
||||
children:
|
||||
ubuntu_workstation:
|
||||
ubuntu_server:
|
||||
|
||||
workstation:
|
||||
children:
|
||||
ubuntu_workstation:
|
||||
|
||||
server:
|
||||
children:
|
||||
ubuntu_server:
|
||||
|
||||
ubuntu_workstation:
|
||||
hosts:
|
||||
deadalus:
|
||||
|
||||
@@ -1 +1,18 @@
|
||||
# install packages with apt
|
||||
---
|
||||
- name: Refresh apt package cache
|
||||
tags: [packages]
|
||||
ansible.builtin.apt:
|
||||
update_cache: true
|
||||
cache_valid_time: 3600
|
||||
|
||||
- name: Install packages on Ubuntu
|
||||
tags: [packages]
|
||||
ansible.builtin.apt:
|
||||
name: >-
|
||||
{{
|
||||
(common_packages | default([]))
|
||||
+ (ubuntu_packages_base | default([]))
|
||||
+ (profile_packages | default([]))
|
||||
+ (host_packages | default([]))
|
||||
}}
|
||||
state: present
|
||||
|
||||
@@ -1 +1,12 @@
|
||||
# workstation profile tasks
|
||||
---
|
||||
- name: Ensure workstation user directories exist
|
||||
tags: [dotfiles, dotfiles:workstation]
|
||||
ansible.builtin.file:
|
||||
path: "{{ item.path }}"
|
||||
state: directory
|
||||
owner: "{{ username }}"
|
||||
group: "{{ user_group }}"
|
||||
mode: "{{ item.mode }}"
|
||||
loop: "{{ workstation_user_directories | default([]) }}"
|
||||
loop_control:
|
||||
label: "{{ item.path }}"
|
||||
|
||||
@@ -1 +1,20 @@
|
||||
# enable systemd services
|
||||
---
|
||||
- name: Enable base systemd services
|
||||
tags: [services]
|
||||
ansible.builtin.systemd:
|
||||
name: "{{ item }}"
|
||||
enabled: true
|
||||
state: started
|
||||
loop: "{{ enabled_services | default([]) }}"
|
||||
loop_control:
|
||||
label: "{{ item }}"
|
||||
|
||||
- name: Enable host systemd services
|
||||
tags: [services]
|
||||
ansible.builtin.systemd:
|
||||
name: "{{ item }}"
|
||||
enabled: true
|
||||
state: started
|
||||
loop: "{{ host_enabled_services | default([]) }}"
|
||||
loop_control:
|
||||
label: "{{ item }}"
|
||||
|
||||
@@ -18,3 +18,11 @@
|
||||
- packages_void
|
||||
- services_runit
|
||||
- profile_desktop_i3
|
||||
|
||||
- hosts: ubuntu_workstation
|
||||
become: true
|
||||
|
||||
roles:
|
||||
- packages_ubuntu
|
||||
- services_systemd
|
||||
- profile_workstation_gnome
|
||||
|
||||
Reference in New Issue
Block a user