Fix: cleaning
This commit is contained in:
parent
09f3981a23
commit
8c81fcd2a2
73
roles/Vagrantfile
vendored
73
roles/Vagrantfile
vendored
@ -1,73 +0,0 @@
|
|||||||
# -*- mode: ruby -*-
|
|
||||||
# vi: set ft=ruby :
|
|
||||||
|
|
||||||
# All Vagrant configuration is done below. The "2" in Vagrant.configure
|
|
||||||
# configures the configuration version (we support older styles for
|
|
||||||
# backwards compatibility). Please don't change it unless you know what
|
|
||||||
# you're doing.
|
|
||||||
Vagrant.configure("2") do |config|
|
|
||||||
# The most common configuration options are documented and commented below.
|
|
||||||
# For a complete reference, please see the online documentation at
|
|
||||||
# https://docs.vagrantup.com.
|
|
||||||
|
|
||||||
# Every Vagrant development environment requires a box. You can search for
|
|
||||||
# boxes at https://vagrantcloud.com/search.
|
|
||||||
config.vm.box = "archlinux/archlinux"
|
|
||||||
|
|
||||||
# Disable automatic box update checking. If you disable this, then
|
|
||||||
# boxes will only be checked for updates when the user runs
|
|
||||||
# `vagrant box outdated`. This is not recommended.
|
|
||||||
# config.vm.box_check_update = false
|
|
||||||
|
|
||||||
# Create a forwarded port mapping which allows access to a specific port
|
|
||||||
# within the machine from a port on the host machine. In the example below,
|
|
||||||
# accessing "localhost:8080" will access port 80 on the guest machine.
|
|
||||||
# NOTE: This will enable public access to the opened port
|
|
||||||
# config.vm.network "forwarded_port", guest: 80, host: 8080
|
|
||||||
|
|
||||||
# Create a forwarded port mapping which allows access to a specific port
|
|
||||||
# within the machine from a port on the host machine and only allow access
|
|
||||||
# via 127.0.0.1 to disable public access
|
|
||||||
# config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1"
|
|
||||||
|
|
||||||
# Create a private network, which allows host-only access to the machine
|
|
||||||
# using a specific IP.
|
|
||||||
# config.vm.network "private_network", ip: "192.168.33.10"
|
|
||||||
|
|
||||||
# Create a public network, which generally matched to bridged network.
|
|
||||||
# Bridged networks make the machine appear as another physical device on
|
|
||||||
# your network.
|
|
||||||
# config.vm.network "public_network"
|
|
||||||
|
|
||||||
# Share an additional folder to the guest VM. The first argument is
|
|
||||||
# the path on the host to the actual folder. The second argument is
|
|
||||||
# the path on the guest to mount the folder. And the optional third
|
|
||||||
# argument is a set of non-required options.
|
|
||||||
# config.vm.synced_folder "../data", "/vagrant_data"
|
|
||||||
|
|
||||||
# Provider-specific configuration so you can fine-tune various
|
|
||||||
# backing providers for Vagrant. These expose provider-specific options.
|
|
||||||
# Example for VirtualBox:
|
|
||||||
#
|
|
||||||
# config.vm.provider "virtualbox" do |vb|
|
|
||||||
# # Display the VirtualBox GUI when booting the machine
|
|
||||||
# vb.gui = true
|
|
||||||
#
|
|
||||||
# # Customize the amount of memory on the VM:
|
|
||||||
# vb.memory = "1024"
|
|
||||||
# end
|
|
||||||
#
|
|
||||||
# View the documentation for the provider you are using for more
|
|
||||||
# information on available options.
|
|
||||||
|
|
||||||
# Enable provisioning with a shell script. Additional provisioners such as
|
|
||||||
# Ansible, Chef, Docker, Puppet and Salt are also available. Please see the
|
|
||||||
# documentation for more information about their specific syntax and use.
|
|
||||||
# config.vm.provision "shell", inline: <<-SHELL
|
|
||||||
# apt-get update
|
|
||||||
# apt-get install -y apache2
|
|
||||||
# SHELL
|
|
||||||
config.vm.provision "ansible" do |ansible|
|
|
||||||
ansible.playbook = "vagrant_playbook.yml"
|
|
||||||
end
|
|
||||||
end
|
|
@ -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/
|
|
@ -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
|
|
@ -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).
|
|
@ -1,136 +0,0 @@
|
|||||||
---
|
|
||||||
# defaults file for arch_pkg_install
|
|
||||||
|
|
||||||
pacman_base:
|
|
||||||
- vim
|
|
||||||
- tmux
|
|
||||||
- git
|
|
||||||
- gnupg
|
|
||||||
|
|
||||||
pacman_admin:
|
|
||||||
- pacman-contrib
|
|
||||||
- sudo
|
|
||||||
- wget
|
|
||||||
- cronie
|
|
||||||
- ruby
|
|
||||||
- tig
|
|
||||||
- openssh
|
|
||||||
- sshfs
|
|
||||||
- htop
|
|
||||||
- ntop
|
|
||||||
- iotop
|
|
||||||
- glances
|
|
||||||
- nmap
|
|
||||||
- nfs-utils
|
|
||||||
- samba
|
|
||||||
- sshpass
|
|
||||||
- rsync
|
|
||||||
- autofs
|
|
||||||
- bind-tools
|
|
||||||
- unzip
|
|
||||||
- ntfs-3g
|
|
||||||
- git-annex
|
|
||||||
- cifs-utils
|
|
||||||
- traceroute
|
|
||||||
- smartmontools
|
|
||||||
- ripgrep
|
|
||||||
- fzf
|
|
||||||
|
|
||||||
pacman_cli:
|
|
||||||
- moc
|
|
||||||
- pass
|
|
||||||
- cups
|
|
||||||
- cups-pdf
|
|
||||||
- task
|
|
||||||
- profanity
|
|
||||||
- neomutt
|
|
||||||
- youtube-dl
|
|
||||||
- neovim
|
|
||||||
- python-pynvim
|
|
||||||
|
|
||||||
pacman_terms:
|
|
||||||
- rxvt-unicode
|
|
||||||
- xdotool
|
|
||||||
- alacritty
|
|
||||||
|
|
||||||
pacman_office:
|
|
||||||
- gimp
|
|
||||||
- firefox
|
|
||||||
- firefox-i18n-fr
|
|
||||||
- chromium
|
|
||||||
- inkscape
|
|
||||||
- pstoedit # Enable latex in inkscape
|
|
||||||
- thunderbird
|
|
||||||
- thunderbird-i18n-fr
|
|
||||||
- libreoffice-fresh
|
|
||||||
- libreoffice-fresh-fr
|
|
||||||
- geogebra
|
|
||||||
- zathura
|
|
||||||
- zathura-ps
|
|
||||||
- zathura-djvu
|
|
||||||
- zathura-cb
|
|
||||||
- zathura-pdf-mupdf
|
|
||||||
- scribus
|
|
||||||
- nextcloud-client
|
|
||||||
- hunspell
|
|
||||||
- hunspell-fr
|
|
||||||
|
|
||||||
pacman_work:
|
|
||||||
- texlive-most
|
|
||||||
- gnuplot
|
|
||||||
- auto-multiple-choice
|
|
||||||
- xournalpp
|
|
||||||
|
|
||||||
pacman_media:
|
|
||||||
- vlc
|
|
||||||
- mpv
|
|
||||||
- mplayer
|
|
||||||
- guvcview
|
|
||||||
|
|
||||||
pacman_3Dprint:
|
|
||||||
- openscad
|
|
||||||
- cura
|
|
||||||
|
|
||||||
pacman_fonts:
|
|
||||||
- awesome-terminal-fonts
|
|
||||||
- cantarell-fonts
|
|
||||||
- gnu-free-fonts
|
|
||||||
- gsfonts
|
|
||||||
- ttf-bitstream-vera
|
|
||||||
- ttf-dejavu
|
|
||||||
- ttf-droid
|
|
||||||
- ttf-roboto
|
|
||||||
- ttf-liberation
|
|
||||||
- ttf-ubuntu-font-family
|
|
||||||
- ttf-inconsolata
|
|
||||||
- noto-fonts
|
|
||||||
|
|
||||||
|
|
||||||
pkgs:
|
|
||||||
- "{{ pacman_base }}"
|
|
||||||
- "{{ pacman_admin }}"
|
|
||||||
- "{{ pacman_cli }}"
|
|
||||||
- "{{ pacman_terms }}"
|
|
||||||
- "{{ pacman_office }}"
|
|
||||||
- "{{ pacman_media }}"
|
|
||||||
- "{{ pacman_work }}"
|
|
||||||
- "{{ pacman_3Dprint }}"
|
|
||||||
- "{{ pacman_fonts }}"
|
|
||||||
|
|
||||||
# Packages to install from AUR
|
|
||||||
aur_fonts:
|
|
||||||
- ttf-ubuntu-mono-derivative-powerline-git
|
|
||||||
- ttf-inconsolata-lgc-for-powerline
|
|
||||||
- ttf-droid-sans-mono-slashed-powerline-git
|
|
||||||
- ttf-literation-mono-powerline-git
|
|
||||||
- ttf-opendyslexic
|
|
||||||
- nerd-fonts-ubuntu-mono
|
|
||||||
- nerd-fonts-droid-sans-mono
|
|
||||||
- nerd-fonts-hack
|
|
||||||
|
|
||||||
aur_work:
|
|
||||||
- perl-locale-codes
|
|
||||||
|
|
||||||
aur_pkgs:
|
|
||||||
- "{{ aur_fonts }}"
|
|
||||||
- "{{ aur_work }}"
|
|
@ -1,2 +0,0 @@
|
|||||||
---
|
|
||||||
# handlers file for arch_pkg_install
|
|
@ -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'
|
|
@ -1,7 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Converge
|
|
||||||
hosts: all
|
|
||||||
tasks:
|
|
||||||
- name: "Include arch_pkg_install"
|
|
||||||
include_role:
|
|
||||||
name: "arch_pkg_install"
|
|
@ -1,11 +0,0 @@
|
|||||||
---
|
|
||||||
dependency:
|
|
||||||
name: galaxy
|
|
||||||
driver:
|
|
||||||
name: vagrant
|
|
||||||
platforms:
|
|
||||||
- name: instance
|
|
||||||
provisioner:
|
|
||||||
name: ansible
|
|
||||||
verifier:
|
|
||||||
name: testinfra
|
|
Binary file not shown.
Binary file not shown.
@ -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
|
|
||||||
)
|
|
@ -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"
|
|
@ -1,14 +0,0 @@
|
|||||||
---
|
|
||||||
# tasks file for arch_pkg_install
|
|
||||||
- name: Install pkgs
|
|
||||||
community.general.pacman:
|
|
||||||
name: "{{ item }}"
|
|
||||||
state: present
|
|
||||||
with_items: pkgs
|
|
||||||
|
|
||||||
|
|
||||||
- name: Install AUR pkgs
|
|
||||||
kewlfft.aur.aur:
|
|
||||||
name: "{{ item }}"
|
|
||||||
state: present
|
|
||||||
with_items: aur_pkgs
|
|
@ -1,2 +0,0 @@
|
|||||||
localhost
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
- hosts: localhost
|
|
||||||
remote_user: root
|
|
||||||
roles:
|
|
||||||
- arch_pkg_install
|
|
@ -1,2 +0,0 @@
|
|||||||
---
|
|
||||||
# vars file for arch_pkg_install
|
|
@ -1,8 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Test Vagrant
|
|
||||||
hosts: all
|
|
||||||
become: true
|
|
||||||
roles:
|
|
||||||
- arch_aur
|
|
||||||
- users
|
|
||||||
- gnome
|
|
Loading…
Reference in New Issue
Block a user