diff --git a/roles/dotfiles/.yamllint b/roles/dotfiles/.yamllint deleted file mode 100644 index 8827676..0000000 --- a/roles/dotfiles/.yamllint +++ /dev/null @@ -1,33 +0,0 @@ ---- -# Based on ansible-lint config -extends: default - -rules: - braces: - max-spaces-inside: 1 - level: error - brackets: - max-spaces-inside: 1 - level: error - colons: - max-spaces-after: -1 - level: error - commas: - max-spaces-after: -1 - level: error - comments: disable - comments-indentation: disable - document-start: disable - empty-lines: - max: 3 - level: error - hyphens: - level: error - indentation: disable - key-duplicates: enable - line-length: disable - new-line-at-end-of-file: disable - new-lines: - type: unix - trailing-spaces: disable - truthy: disable diff --git a/roles/dotfiles/defaults/main.yml b/roles/dotfiles/defaults/main.yml deleted file mode 100644 index 3d498bf..0000000 --- a/roles/dotfiles/defaults/main.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -username: 'user1' - -config2stow: ["nvim", "tmux", "zsh"] diff --git a/roles/dotfiles/molecule/.yamllint b/roles/dotfiles/molecule/.yamllint deleted file mode 100644 index 8827676..0000000 --- a/roles/dotfiles/molecule/.yamllint +++ /dev/null @@ -1,33 +0,0 @@ ---- -# Based on ansible-lint config -extends: default - -rules: - braces: - max-spaces-inside: 1 - level: error - brackets: - max-spaces-inside: 1 - level: error - colons: - max-spaces-after: -1 - level: error - commas: - max-spaces-after: -1 - level: error - comments: disable - comments-indentation: disable - document-start: disable - empty-lines: - max: 3 - level: error - hyphens: - level: error - indentation: disable - key-duplicates: enable - line-length: disable - new-line-at-end-of-file: disable - new-lines: - type: unix - trailing-spaces: disable - truthy: disable diff --git a/roles/dotfiles/molecule/default/INSTALL.rst b/roles/dotfiles/molecule/default/INSTALL.rst deleted file mode 100644 index 0c4bf5c..0000000 --- a/roles/dotfiles/molecule/default/INSTALL.rst +++ /dev/null @@ -1,23 +0,0 @@ -********************************* -Vagrant driver installation guide -********************************* - -Requirements -============ - -* Vagrant -* Virtualbox, Parallels, VMware Fusion, VMware Workstation or VMware Desktop - -Install -======= - -Please refer to the `Virtual environment`_ documentation for installation best -practices. If not using a virtual environment, please consider passing the -widely recommended `'--user' flag`_ when invoking ``pip``. - -.. _Virtual environment: https://virtualenv.pypa.io/en/latest/ -.. _'--user' flag: https://packaging.python.org/tutorials/installing-packages/#installing-to-the-user-site - -.. code-block:: bash - - $ pip install 'molecule_vagrant' diff --git a/roles/dotfiles/molecule/default/converge.yml b/roles/dotfiles/molecule/default/converge.yml deleted file mode 100644 index aef6149..0000000 --- a/roles/dotfiles/molecule/default/converge.yml +++ /dev/null @@ -1,43 +0,0 @@ ---- -- name: Converge - hosts: all - vars: - users: - - username: user1 - config2stow: ["nvim", "tmux", "zsh"] - password: "$y$j9T$PR8GfM2MjGudOCd7hF9NP1$/qRGtuNuWaRVVGmB1A4rgtaT0MMB9IoB4fnaxW1kvf4" #plop - - username: user2 - password: "$y$j9T$PR8GfM2MjGudOCd7hF9NP1$/qRGtuNuWaRVVGmB1A4rgtaT0MMB9IoB4fnaxW1kvf4" #plop - config2stow: ["nvim", "tmux"] - - pre_tasks: - - name: update_cache for arch - pacman: - update_cache: yes - become: yes - when: ansible_os_family == "Archlinux" - - - name: update_cache for debian - apt: - update_cache: yes - become: yes - when: ansible_os_family == "Debian" - - - name: Create user - ansible.builtin.user: - name: "{{ item.username }}" - password: "{{ item.password }}" #plop - state: present - with_items: "{{ users }}" - become: yes - - tasks: - - name: "Include dotfiles" - include_role: - name: "dotfiles" - vars: - username: "{{ user.username }}" - config2stow: "{{ user.config2stow }}" - loop: "{{ users }}" - loop_control: - loop_var: user diff --git a/roles/dotfiles/molecule/default/molecule.yml b/roles/dotfiles/molecule/default/molecule.yml deleted file mode 100644 index 40a4759..0000000 --- a/roles/dotfiles/molecule/default/molecule.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -dependency: - name: galaxy -driver: - name: vagrant -platforms: - - name: archlinux - box: "archlinux/archlinux" - - name: Debian - box: "debian/bullseye64" -provisioner: - name: ansible -verifier: - name: testinfra - options: - sudo: true diff --git a/roles/dotfiles/molecule/default/tests/conftest.py b/roles/dotfiles/molecule/default/tests/conftest.py deleted file mode 100644 index f7ddb3f..0000000 --- a/roles/dotfiles/molecule/default/tests/conftest.py +++ /dev/null @@ -1,22 +0,0 @@ -"""PyTest Fixtures.""" -from __future__ import absolute_import - -import os - -import pytest - - -def pytest_runtest_setup(item): - """Run tests only when under molecule with testinfra installed.""" - try: - import testinfra - except ImportError: - pytest.skip("Test requires testinfra", allow_module_level=True) - if "MOLECULE_INVENTORY_FILE" in os.environ: - pytest.testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( - os.environ["MOLECULE_INVENTORY_FILE"] - ).get_hosts("all") - else: - pytest.skip( - "Test should run only from inside molecule.", allow_module_level=True - ) diff --git a/roles/dotfiles/molecule/default/tests/test_default.py b/roles/dotfiles/molecule/default/tests/test_default.py deleted file mode 100644 index 5a3de91..0000000 --- a/roles/dotfiles/molecule/default/tests/test_default.py +++ /dev/null @@ -1,39 +0,0 @@ -"""Role testing files using testinfra.""" - -USER1 = "user1" -USER2 = "user2" - -def test_stow_installed(host): - stow = host.package("stow") - assert stow.is_installed - -def test_dotfile_cloned(host): - dotfiles = host.file(f"/home/{USER1}/.dotfiles") - assert dotfiles.exists - assert dotfiles.user == USER1 - - dotfiles = host.file(f"/home/{USER2}/.dotfiles") - assert dotfiles.exists - assert dotfiles.user == USER2 - -def test_dotfile_stowed(host): - homepath = f"/home/{USER1}" - nvim = host.file(homepath + "/.config/nvim/") - assert nvim.exists - tmux = host.file(homepath + "/.tmux/") - assert tmux.exists - zshenv = host.file(homepath + "/.zshenv") - assert zshenv.exists - zsh = host.file(homepath + "/.config/zsh/") - assert zsh.exists - - homepath = f"/home/{USER2}" - nvim = host.file(homepath + "/.config/nvim/") - assert nvim.exists - tmux = host.file(homepath + "/.tmux/") - assert tmux.exists - zshenv = host.file(homepath + "/.zshenv") - assert not zshenv.exists - zsh = host.file(homepath + "/.config/zsh/") - assert not zsh.exists - diff --git a/roles/dotfiles/tasks/arch.yml b/roles/dotfiles/tasks/arch.yml deleted file mode 100644 index 2a8502b..0000000 --- a/roles/dotfiles/tasks/arch.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -- name: Install stow - community.general.pacman: - name: stow - state: present - become: true - -- name: Install git - community.general.pacman: - name: git - state: present - become: true diff --git a/roles/dotfiles/tasks/debian.yml b/roles/dotfiles/tasks/debian.yml deleted file mode 100644 index d37ecf4..0000000 --- a/roles/dotfiles/tasks/debian.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- -- name: Install stow - apt: - name: stow - state: present - update_cache: yes - become: true - -- name: Install git - apt: - name: git - state: present - update_cache: yes - become: true diff --git a/roles/dotfiles/tasks/gnome.yml b/roles/dotfiles/tasks/gnome.yml deleted file mode 100644 index cc06bf7..0000000 --- a/roles/dotfiles/tasks/gnome.yml +++ /dev/null @@ -1,42 +0,0 @@ ---- -- name: to close window - dconf: - key: "/org/gnome/desktop/wm/keybindings/close" - value: "['q']" - state: present - -- name: to fire a terminal - binding - dconf: - key: "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/binding" - value: "'Return'" - state: present - -- name: to fire a terminal - command - dconf: - key: "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/command" - value: "'urxvt'" - state: present - -- name: to fire a terminal - name - dconf: - key: "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/name" - value: "'Terminal'" - state: present - -- name: Shell theme - dconf: - key: "/org/gnome/shell/extensions/user-theme/name" - value: "'Materia-dark-compact'" - state: present - -- name: Gtk theme - dconf: - key: "/org/gnome/desktop/interface/gkt-theme" - value: "'Materia-dark-compact'" - state: present - -- name: Icon theme - dconf: - key: "/org/gnome/desktop/interface/icon-theme" - value: "'Tela-orange-dark'" - state: present diff --git a/roles/dotfiles/tasks/main.yml b/roles/dotfiles/tasks/main.yml deleted file mode 100644 index 82ce634..0000000 --- a/roles/dotfiles/tasks/main.yml +++ /dev/null @@ -1,33 +0,0 @@ ---- -- name: Install for arch - import_tasks: arch.yml - when: ansible_os_family == "Archlinux" - -- name: Install for debian - import_tasks: debian.yml - when: ansible_os_family == "Debian" - -- name: Clone dotfiles - ansible.builtin.git: - repo: 'https://git.opytex.org/lafrite/dotfiles.git' - dest: "/home/{{ username }}/.dotfiles" - become: yes - -- name: user owns its dotfiles - ansible.builtin.file: - path: "/home/{{ username }}/.dotfiles" - owner: "{{ username }}" - become: yes - -- name: stow configs - ansible.builtin.command: - cmd: stow {{ item }} - chdir: "/home/{{ username }}/.dotfiles" - with_items: "{{ config2stow }}" - become: yes - -- name: Gnome config - import_tasks: gnome.yml - #become: true - become_user: "{{ username }}" - when: no # soucis avec la version de psutil diff --git a/roles/gnome/.travis.yml b/roles/gnome/.travis.yml deleted file mode 100644 index 36bbf62..0000000 --- a/roles/gnome/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ ---- -language: python -python: "2.7" - -# Use the new container infrastructure -sudo: false - -# Install ansible -addons: - apt: - packages: - - python-pip - -install: - # Install ansible - - pip install ansible - - # Check ansible version - - ansible --version - - # Create ansible.cfg with correct roles_path - - printf '[defaults]\nroles_path=../' >ansible.cfg - -script: - # Basic role syntax check - - ansible-playbook tests/test.yml -i tests/inventory --syntax-check - -notifications: - webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/roles/gnome/.yamllint b/roles/gnome/.yamllint deleted file mode 100644 index 8827676..0000000 --- a/roles/gnome/.yamllint +++ /dev/null @@ -1,33 +0,0 @@ ---- -# Based on ansible-lint config -extends: default - -rules: - braces: - max-spaces-inside: 1 - level: error - brackets: - max-spaces-inside: 1 - level: error - colons: - max-spaces-after: -1 - level: error - commas: - max-spaces-after: -1 - level: error - comments: disable - comments-indentation: disable - document-start: disable - empty-lines: - max: 3 - level: error - hyphens: - level: error - indentation: disable - key-duplicates: enable - line-length: disable - new-line-at-end-of-file: disable - new-lines: - type: unix - trailing-spaces: disable - truthy: disable diff --git a/roles/gnome/README.md b/roles/gnome/README.md deleted file mode 100644 index 225dd44..0000000 --- a/roles/gnome/README.md +++ /dev/null @@ -1,38 +0,0 @@ -Role Name -========= - -A brief description of the role goes here. - -Requirements ------------- - -Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. - -Role Variables --------------- - -A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. - -Dependencies ------------- - -A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. - -Example Playbook ----------------- - -Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: - - - hosts: servers - roles: - - { role: username.rolename, x: 42 } - -License -------- - -BSD - -Author Information ------------------- - -An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/roles/gnome/defaults/main.yml b/roles/gnome/defaults/main.yml deleted file mode 100644 index 0f7541b..0000000 --- a/roles/gnome/defaults/main.yml +++ /dev/null @@ -1,19 +0,0 @@ ---- -# defaults file for gnome -pacman_gnome: - - gnome - - gdm - - gnome-tweaks - - gparted - - transmission-gtk - - quodlibet - - networkmanager - - network-manager-applet - - gnome-keyring - - grsync - - soundconverter - - picard - - shotwell - - pitivi - - seahorse - - python-psutil diff --git a/roles/gnome/handlers/main.yml b/roles/gnome/handlers/main.yml deleted file mode 100644 index 5371043..0000000 --- a/roles/gnome/handlers/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# handlers file for gnome diff --git a/roles/gnome/molecule/default/INSTALL.rst b/roles/gnome/molecule/default/INSTALL.rst deleted file mode 100644 index 0c4bf5c..0000000 --- a/roles/gnome/molecule/default/INSTALL.rst +++ /dev/null @@ -1,23 +0,0 @@ -********************************* -Vagrant driver installation guide -********************************* - -Requirements -============ - -* Vagrant -* Virtualbox, Parallels, VMware Fusion, VMware Workstation or VMware Desktop - -Install -======= - -Please refer to the `Virtual environment`_ documentation for installation best -practices. If not using a virtual environment, please consider passing the -widely recommended `'--user' flag`_ when invoking ``pip``. - -.. _Virtual environment: https://virtualenv.pypa.io/en/latest/ -.. _'--user' flag: https://packaging.python.org/tutorials/installing-packages/#installing-to-the-user-site - -.. code-block:: bash - - $ pip install 'molecule_vagrant' diff --git a/roles/gnome/molecule/default/converge.yml b/roles/gnome/molecule/default/converge.yml deleted file mode 100644 index 51db134..0000000 --- a/roles/gnome/molecule/default/converge.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -- name: Converge - hosts: all - tasks: - - name: "Include gnome" - include_role: - name: "gnome" diff --git a/roles/gnome/molecule/default/molecule.yml b/roles/gnome/molecule/default/molecule.yml deleted file mode 100644 index 748eb79..0000000 --- a/roles/gnome/molecule/default/molecule.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -dependency: - name: galaxy -driver: - name: vagrant -platforms: - - name: instance -provisioner: - name: ansible -verifier: - name: testinfra diff --git a/roles/gnome/molecule/default/tests/__pycache__/conftest.cpython-39.pyc b/roles/gnome/molecule/default/tests/__pycache__/conftest.cpython-39.pyc deleted file mode 100644 index 2c49c25..0000000 Binary files a/roles/gnome/molecule/default/tests/__pycache__/conftest.cpython-39.pyc and /dev/null differ diff --git a/roles/gnome/molecule/default/tests/__pycache__/test_default.cpython-39.pyc b/roles/gnome/molecule/default/tests/__pycache__/test_default.cpython-39.pyc deleted file mode 100644 index 326c8e8..0000000 Binary files a/roles/gnome/molecule/default/tests/__pycache__/test_default.cpython-39.pyc and /dev/null differ diff --git a/roles/gnome/molecule/default/tests/conftest.py b/roles/gnome/molecule/default/tests/conftest.py deleted file mode 100644 index f7ddb3f..0000000 --- a/roles/gnome/molecule/default/tests/conftest.py +++ /dev/null @@ -1,22 +0,0 @@ -"""PyTest Fixtures.""" -from __future__ import absolute_import - -import os - -import pytest - - -def pytest_runtest_setup(item): - """Run tests only when under molecule with testinfra installed.""" - try: - import testinfra - except ImportError: - pytest.skip("Test requires testinfra", allow_module_level=True) - if "MOLECULE_INVENTORY_FILE" in os.environ: - pytest.testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( - os.environ["MOLECULE_INVENTORY_FILE"] - ).get_hosts("all") - else: - pytest.skip( - "Test should run only from inside molecule.", allow_module_level=True - ) diff --git a/roles/gnome/molecule/default/tests/test_default.py b/roles/gnome/molecule/default/tests/test_default.py deleted file mode 100644 index 0cff669..0000000 --- a/roles/gnome/molecule/default/tests/test_default.py +++ /dev/null @@ -1,10 +0,0 @@ -"""Role testing files using testinfra.""" - - -def test_hosts_file(host): - """Validate /etc/hosts file.""" - f = host.file("/etc/hosts") - - assert f.exists - assert f.user == "root" - assert f.group == "root" diff --git a/roles/gnome/tasks/arch.yml b/roles/gnome/tasks/arch.yml deleted file mode 100644 index f584c97..0000000 --- a/roles/gnome/tasks/arch.yml +++ /dev/null @@ -1,35 +0,0 @@ ---- -# tasks file for gnome -- name: Install gnome packages - pacman: - name: "{{ item }}" - state: present - with_items: "{{ pacman_gnome }}" - -- name: Install look and feel - pacman: - name: - - materia-gtk-theme - - gnome-icon-theme-extras - - arc-solid-gtk-theme - - arc-gtk-theme - - gnome-themes-extra - - gnome-icon-theme-symbolic - - gnome-icon-theme - - adwaita-icon-theme - state: present - -- name: Install AUR Icons and gtk themes - aur: - name: "{{ item }}" - use: makepkg - state: present - with_items: - - plata-theme - - gnome-colors-icon-theme - - numix-icon-theme-git - - numix-circle-icon-theme-git - - tela-icon-theme-git - become: yes - become_user: aur_builder - diff --git a/roles/gnome/tasks/main.yml b/roles/gnome/tasks/main.yml deleted file mode 100644 index 2e4b692..0000000 --- a/roles/gnome/tasks/main.yml +++ /dev/null @@ -1,81 +0,0 @@ ---- -# tasks file for gnome -- name: Install gnome for arch - import_tasks: arch.yml - when: ansible_os_family == "Archlinux" - - -- name: enable service gdm - systemd: - name: gdm - enabled: yes - -- name: disable old network services - systemd: - name: '{{ item }}' - enabled: no - with_items: - - dhcpcd - ignore_errors: yes - -- name: enable service NetworkManager - systemd: - name: NetworkManager - enabled: yes - -- name: to close window - dconf: - key: "/org/gnome/desktop/wm/keybindings/close" - value: "['q']" - state: present - become: true - become_user: "{{ me.username }}" - -- name: to fire a terminal - binding - dconf: - key: "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/binding" - value: "'Return'" - state: present - become: true - become_user: "{{ me.username }}" - -- name: to fire a terminal - command - dconf: - key: "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/command" - value: "'urxvt'" - state: present - become: true - become_user: "{{ me.username }}" - -- name: to fire a terminal - name - dconf: - key: "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/name" - value: "'Terminal'" - state: present - become: true - become_user: "{{ me.username }}" - -- name: Shell theme - dconf: - key: "/org/gnome/shell/extensions/user-theme/name" - value: "'Materia-dark-compact'" - state: present - become: true - become_user: "{{ me.username }}" - -- name: Gtk theme - dconf: - key: "/org/gnome/desktop/interface/gkt-theme" - value: "'Materia-dark-compact'" - state: present - become: true - become_user: "{{ me.username }}" - -- name: Icon theme - dconf: - key: "/org/gnome/desktop/interface/icon-theme" - value: "'Tela-orange-dark'" - state: present - become: true - become_user: "{{ me.username }}" - diff --git a/roles/gnome/tests/inventory b/roles/gnome/tests/inventory deleted file mode 100644 index 878877b..0000000 --- a/roles/gnome/tests/inventory +++ /dev/null @@ -1,2 +0,0 @@ -localhost - diff --git a/roles/gnome/tests/test.yml b/roles/gnome/tests/test.yml deleted file mode 100644 index 424c567..0000000 --- a/roles/gnome/tests/test.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -- hosts: localhost - remote_user: root - roles: - - gnome diff --git a/roles/gnome/vars/main.yml b/roles/gnome/vars/main.yml deleted file mode 100644 index 9f46d6a..0000000 --- a/roles/gnome/vars/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# vars file for gnome