Whitespace cleanup to get in sync with AniNIX/Uniglot hooks

This commit is contained in:
2022-11-20 20:03:01 -06:00
parent a43cb4b6bb
commit a34c96df6b
96 changed files with 713 additions and 400 deletions

View File

@@ -1,9 +1,9 @@
#!/bin/bash
# File: find-mirrors
#
#
# Description: This file generates a pacman mirrorlist to ensure hosts use the right mirrors for performance.
#
#
# Package: AniNIX::Foundation/HelloWorld
# Copyright: WTFPL
#
@@ -11,6 +11,6 @@
country="United States"
curl -s https://raw.githubusercontent.com/archlinux/svntogit-packages/packages/pacman-mirrorlist/trunk/mirrorlist | awk '/^## '"$country"'$/{f=1; next}f==0{next}/^$/{exit}{print substr($0, 1);}' | sed 's/^#Server/Server/' > /tmp/mirrorlist
curl -s https://raw.githubusercontent.com/archlinux/svntogit-packages/packages/pacman-mirrorlist/trunk/mirrorlist | awk '/^## '"$country"'$/{f=1; next}f==0{next}/^$/{exit}{print substr($0, 1);}' | sed 's/^#Server/Server/' > /tmp/mirrorlist
rankmirrors -n 6 /tmp/mirrorlist > files/mirrorlist
rm /tmp/mirrorlist

View File

@@ -0,0 +1,10 @@
#
# /etc/bash.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
[[ $DISPLAY ]] && shopt -s checkwinsize
[ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion

View File

@@ -99,7 +99,7 @@ Include = /etc/pacman.d/mirrorlist.shadowarch
#[custom]
#SigLevel = Optional TrustAll
#Server = file:///home/custompkgs
[AniNIX]
SigLevel = Required DatabaseOptional
Server = https://maat.aninix.net/

View File

@@ -0,0 +1,32 @@
" All system-wide defaults are set in $VIMRUNTIME/archlinux.vim (usually just
" /usr/share/vim/vimfiles/archlinux.vim) and sourced by the call to :runtime
" you can find below. If you wish to change any of those settings, you should
" do it in this file (/etc/vimrc), since archlinux.vim will be overwritten
" everytime an upgrade of the vim packages is performed. It is recommended to
" make changes after sourcing archlinux.vim since it alters the value of the
" 'compatible' option.
" This line should not be removed as it ensures that various options are
" properly set to work with the Vim-related packages.
runtime! archlinux.vim
" If you prefer the old-style vim functionalty, add 'runtime! vimrc_example.vim'
" Or better yet, read /usr/share/vim/vim74/vimrc_example.vim or the vim manual
" and configure vim to your own liking!
syntax on
filetype on
" Support CSharp files like Java
au BufNewFile,BufRead *.csharp set filetype=java
au BufNewFile,BufRead *.cs set filetype=java
set number
set mouse-=a
colorscheme desert
" This establishes the indenting policy.
filetype plugin indent on
" show existing tab with 4 spaces width
set tabstop=4
" when indenting with '>', use 4 spaces width
set shiftwidth=4
" On pressing tab, insert 4 spaces
set expandtab

View File

@@ -1,4 +1,4 @@
---
---
- name: ArchLinux network packages
become: yes
@@ -30,4 +30,4 @@
- name: Enable network config
become: yes
command: "netctl enable {{ ipinterface }}"
command: "netctl enable {{ ipinterface }}"

View File

@@ -0,0 +1,37 @@
- name: Set Bash MOTD
become: yes
copy:
src: "motd/{{ inventory_hostname }}"
dest: /etc/bash.motd
owner: root
group: root
mode: 0644
- name: Nullify overall MOTD
become: yes
copy:
src: /dev/null
dest: /etc/motd
owner: root
group: root
mode: 0644
- name: Bashrc
become: yes
copy:
src: bashrc
dest: /etc/bashrc
owner: root
group: root
mode: 0644
- name: vimrc
become: yes
copy:
src: vimrc
dest: /etc/vimrc
owner: root
group: root
mode: 0644

View File

@@ -2,8 +2,8 @@
- name: Install DNS packages
become: yes
ignore_errors: yes
package:
name:
package:
name:
- bind
- net-tools
- iputils

View File

@@ -58,10 +58,14 @@
ignore_errors: yes
register: root_password_test
vars:
ansible_become_user: "{{ item }}"
ansible_become_method: su
ansible_become_password: "{{ passwords[inventory_hostname] }}"
become: yes
command: id
loop:
- root
- "{{ ansible_user_id }}"
- name: Define passwords
vars:
@@ -70,7 +74,7 @@
become: yes
when: root_password_test.rc is not defined or root_password_test.rc != 0
command:
cmd: /bin/bash -l -c "printf '%s\n%s\n' '{{ passwords[inventory_hostname] }}' '{{ passwords[inventory_hostname] }}' | passwd {{ item }}"
cmd: /bin/bash -l -c "echo '{{item}}:{{ passwords[inventory_hostname] }}' | chpasswd {{ item }}"
loop:
- root
- "{{ ansible_user_id }}"
@@ -163,24 +167,6 @@
hostname:
name: "{{ inventory_hostname }}.{{ replica_domain }}"
- name: Set Bash MOTD
become: yes
copy:
src: "motd/{{ inventory_hostname }}"
dest: /etc/bash.motd
owner: root
group: root
mode: 0644
- name: Nullify overall MOTD
become: yes
copy:
src: /dev/null
dest: /etc/motd
owner: root
group: root
mode: 0644
- include: archlinux-network.yml
when: ansible_os_family == "Archlinux"
@@ -190,3 +176,5 @@
- include: dns.yml
- include: ntp.yml
- include: bash.yml

View File

@@ -10,7 +10,7 @@
- name: Remove legacy NTP services
become: yes
ignore_errors: yes
service:
service:
name: "{{ item }}"
state: stopped
enabled: no
@@ -20,15 +20,15 @@
- name: Remove legacy NTP packages
become: yes
package:
name:
package:
name:
- ntp
- openntpd
state: absent
- name: Install NTP packages
become: yes
package:
package:
name: chrony
state: present

View File

@@ -1,4 +1,4 @@
---
---
- name: Rasbian network packages
become: yes
@@ -17,7 +17,7 @@
group: root
mode: 0644
- name: Rasbian network config (static)
- name: Rasbian network config (static)
become: yes
when: static
template: