Feat: move gnome to workstation and order/test it

This commit is contained in:
Bertrand Benjamin 2022-01-12 09:31:58 +01:00
parent e346a61ced
commit cc40db2449
8 changed files with 80 additions and 68 deletions

View File

@ -7,6 +7,7 @@ pacman_utils:
- cups-pdf
- avahi
- nss-mdns
- networkmanager
pacman_cli:
- git-annex
@ -94,6 +95,23 @@ pacman_programming:
- nodejs
- yarn
pacman_gnome:
- gnome
- gdm
- gnome-tweaks
- gparted
- transmission-gtk
- quodlibet
- network-manager-applet
- gnome-keyring
- grsync
- soundconverter
- picard
- shotwell
- pitivi
- seahorse
- python-psutil
pacman_pkgs:
- "{{ pacman_utils }}"
- "{{ pacman_cli }}"
@ -125,7 +143,11 @@ aur_pkgs:
- "{{ aur_fonts }}"
- "{{ aur_work }}"
# Gnome
gnome_environnement: false
# Autofs
autofs:
host: nas
- host: nas

View File

@ -1,52 +0,0 @@
galaxy_info:
author: your name
description: your role description
company: your company (optional)
# If the issue tracker for your role is not on github, uncomment the
# next line and provide a value
# issue_tracker_url: http://example.com/issue/tracker
# Choose a valid license ID from https://spdx.org - some suggested licenses:
# - BSD-3-Clause (default)
# - MIT
# - GPL-2.0-or-later
# - GPL-3.0-only
# - Apache-2.0
# - CC-BY-4.0
license: license (GPL-2.0-or-later, MIT, etc)
min_ansible_version: 2.1
# If this a Container Enabled role, provide the minimum Ansible Container version.
# min_ansible_container_version:
#
# Provide a list of supported platforms, and for each platform a list of versions.
# If you don't wish to enumerate all versions for a particular platform, use 'all'.
# To view available platforms and versions (or releases), visit:
# https://galaxy.ansible.com/api/v1/platforms/
#
# platforms:
# - name: Fedora
# versions:
# - all
# - 25
# - name: SomePlatform
# versions:
# - all
# - 1.0
# - 7
# - 99.99
galaxy_tags: []
# List tags for your role here, one per line. A tag is a keyword that describes
# and categorizes the role. Users find roles by searching for tags. Be sure to
# remove the '[]' above, if you add tags to this list.
#
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
# Maximum 20 tags per role.
dependencies: []
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
# if you add dependencies to this list.

View File

@ -1,17 +1,23 @@
---
- name: Converge
hosts: all
become: true
vars:
pacman_pkgs:
- "{{ pacman_utils }}"
aur_pkgs:
- "{{ aur_utils }}"
pre_tasks:
- name: Install pkgs
- name: Update cache
community.general.pacman:
update_cache: true
become: true
- name: set AUR
include_role:
name: "../arch_aur"
tasks:
- name: "Include workstation"
include_role:
name: "workstation"

View File

@ -4,8 +4,11 @@ dependency:
driver:
name: vagrant
platforms:
- name: instance
- name: archlinux
box: "archlinux/archlinux"
provisioner:
name: ansible
verifier:
name: testinfra
options:
sudo: true

View File

@ -21,3 +21,7 @@
with_items: "{{ aur_pkgs }}"
become: yes
become_user: aur_builder
- name: Install gnome environnement
import_tasks: gnome.yml
when: gnome_environnement

View File

@ -0,0 +1,13 @@
---
# tasks file for gnome
- name: Install gnome pkgs
community.general.pacman:
name: "{{ item }}"
state: present
with_items: "{{ pacman_gnome }}"
when: ansible_os_family == "Archlinux"
- name: enable service gdm
systemd:
name: gdm
enabled: yes

View File

@ -1,18 +1,30 @@
---
- name: Create NAS share directory
- name: Create auto host share directory
file:
path: "/media/{{ item.host }}"
state: directory
with_items: "{{ autofs }}"
- name: Activate NAS shares for autofs
- name: Activate host shares for autofs
lineinfile:
path: /etc/autofs/auto.master
line: "/media/{{ item.host }} /etc/autofs/auto.{{ item.host }} --timeout=60 --browse"
with_items: "{{ autofs }}"
- name: NAS autofs config file
- name: autofs config file
template:
src: "files/autofs.{{ item.host }}"
dest: "/etc/autofs/auto.{{ item.host }}"
with_items: "{{ autofs }}"
- name: enable service nfs
systemd:
name: nfs-client.target
enabled: yes
state: started
- name: Enable autofs daemon
service:
name: autofs
state: started
enabled: yes

View File

@ -2,7 +2,6 @@
# tasks file for workstation
- name: Install for arch
import_tasks: arch.yml
when: ansible_os_family == "Archlinux"
- name: enable service cups
systemd:
@ -23,14 +22,19 @@
enabled: yes
state: started
- name: enable service nfs
- name: disable old network services
systemd:
name: nfs-client.target
enabled: yes
state: started
name: '{{ item }}'
enabled: no
with_items:
- dhcpcd
ignore_errors: yes
- name: Enable autofs daemon
service:
name: autofs
state: started
- name: enable service NetworkManager
systemd:
name: NetworkManager
enabled: yes
- name: activate autofs
import_tasks: home_mounts.yml
when: autofs | length > 0