README fixes

This commit is contained in:
Shaun Reed 2019-08-31 03:01:59 -04:00
parent 2bebf584f8
commit 59ad80bda7
7 changed files with 61 additions and 54 deletions

View File

@ -40,46 +40,48 @@ klips/
└── setup-vim.sh └── setup-vim.sh
``` ```
ansible - Ansible roles, playbooks ### ansible
Ansible roles, playbooks
- apt-up.yml - Playbook to update servers / groups ad hoc - apt-up.yml - Playbook to update servers / groups ad hoc
- core.yml - Playbook example for using core configuration role - core.yml - Playbook example for using core configuration role
- docker.yml - Playbook example for using docker install role (Debian / Ubuntu) - docker.yml - Playbook example for using docker install role (Debian / Ubuntu)
- hosts - Same ansible hosts file - hosts - Sample / partially default ansible hosts file
- make-host.yml - Playbook example for using multiple roles together to create a new host - make-host.yml - Playbook example for using multiple roles together to create a new host
- nginx.yml - Playbook example for using nginx role - nginx.yml - Playbook example for using nginx role
- roles - Some simple Ansible roles created with `ansible-galaxy init <role> --offline` command - roles - Some simple Ansible roles created with `ansible-galaxy init <role> --offline` command
-- core - Role to configure a new host with basic authentication / package settings - core - Role to configure a new host with basic authentication / package settings
-- docker - Role to install docker, docker-compose, configure docker user group (Debian / Ubuntu) - docker - Role to install docker, docker-compose, configure docker user group (Debian / Ubuntu)
-- nginx - Role to install and configure a new nginx webserver on a host - nginx - Role to install and configure a new nginx webserver on a host
configs ### configs
- .vimrc - Various settings for vim, can be copied or used with setup-vim.sh) - .vimrc - Various settings for vim, can be copied or used with setup-vim.sh)
- .vimrc-README - What these settings do, output when setup-vim.sh is ran.) - .vimrc-README - What these settings do, output when setup-vim.sh is ran.)
plates ### plates
- cpp-cmake - Simple cpp executable template, built using cmake - cpp-cmake - Simple cpp executable template, built using cmake
- cpp-launcher - Simple cpp launcher template, built using cmake. Easily expandable. - cpp-launcher - Simple cpp launcher template, built using cmake. Easily expandable.
refs ### refs
- doxygenROT - Basic rule-of-thumb for Doxygen commenting - doxygenROT - Basic rule-of-thumb for Doxygen commenting
scripts ### scripts
- adduser.sh - Script to add new user, run with sudo if you want to configure / allow user to sudo - adduser.sh - Script to add new user, run with sudo if you want to configure / allow user to sudo
-- ./adduser - (Print help text) - ./adduser - (Print help text)
-- ./adduser <name> <userID> - (Don't need sudo if new user doesn't need it) - ./adduser <name> <userID> - (Don't need sudo if new user doesn't need it)
-- sudo ./adduser <name> <userID> - sudo ./adduser <name> <userID>
-- sudo ./adduser jeff 1005 - (Create jeff user and assign userID to 1005) - sudo ./adduser jeff 1005 - (Create jeff user and assign userID to 1005)
-- Follow prompts to configure password / sudo depending on needs of new user - Follow prompts to configure password / sudo depending on needs of new user
- cmake-build.sh - Script to toss around and build cmake projects - cmake-build.sh - Script to toss around and build cmake projects
- README.md - Further clarification of scripts - README.md - Further clarification of scripts
- setup-vim.sh - Script for setting up vim configuration - setup-vim.sh - Script for setting up vim configuration
-- Includes Pathogen Plugin manager - Includes Pathogen Plugin manager
-- Includes auto-completion (Clang_completion) - Includes auto-completion (Clang_completion)
-- Supertab completion interaction (Tab to interact with completion context) - Supertab completion interaction (Tab to interact with completion context)
-- Syntax highlighting - Syntax highlighting
-- Tabsize 2, use spaces in place of tabs - Tabsize 2, use spaces in place of tabs
-- auto indentation, mouse interaction when supported - auto indentation, mouse interaction when supported
-- Custom keybind (Ctrl-e for jumping windows || Ctrl-w still works if not in a tabbed terminal where the same will close the tab) - Custom keybind (Ctrl-e for jumping windows || Ctrl-w still works if not in a tabbed terminal where the same will close the tab)
-- See klips/configs/.vimrc-README for more information - See klips/configs/.vimrc-README for more information

View File

@ -6,13 +6,13 @@ Playbooks
- apt-up.yml - Playbook to update servers / groups ad hoc - apt-up.yml - Playbook to update servers / groups ad hoc
- core.yml - Playbook example for using core configuration role - core.yml - Playbook example for using core configuration role
- docker.yml - Playbook example for using docker install role (Debian / Ubuntu) - docker.yml - Playbook example for using docker install role (Debian / Ubuntu)
- hosts - Same ansible hosts file - hosts - Sample / partially default ansible hosts file
- make-host.yml - Playbook example for using multiple roles together to create a new host - make-host.yml - Playbook example for using multiple roles together to create a new host
- nginx.yml - Playbook example for using nginx role - nginx.yml - Playbook example for using nginx role
Roles Roles
- roles - Basic ansible role created with ansible-galaxy command - roles - Basic ansible role created with ansible-galaxy command
-- core - Role to configure a new host with basic authentication / package settings - core - Role to configure a new host with basic authentication / package settings
-- docker - Role to install docker, docker-compose, configure docker user group (Debian / Ubuntu) - docker - Role to install docker, docker-compose, configure docker user group (Debian / Ubuntu)
-- nginx - Role to install and configure a new nginx webserver on a host - nginx - Role to install and configure a new nginx webserver on a host

View File

@ -3,9 +3,9 @@
Some simple Ansible roles created with `ansible-galaxy init <role> --offline` command Some simple Ansible roles created with `ansible-galaxy init <role> --offline` command
klips/ansible/roles/... klips/ansible/roles/...
-- core - Role to configure a new host with basic authentication / package settings - core - Role to configure a new host with basic authentication / package settings
-- docker - Role to install docker, docker-compose, configure docker user group - docker - Role to install docker, docker-compose, configure docker user group
-- nginx - Role to install and configure a new nginx webserver on a host - nginx - Role to install and configure a new nginx webserver on a host
All of these roles assume you are using the apt package manager, and running a Debian / Ubuntu system. All of these roles assume you are using the apt package manager, and running a Debian / Ubuntu system.
@ -16,14 +16,14 @@ A simple role for configuring a set of packages / settings on a new Ubuntu host
Packages Added / Configured Packages Added / Configured
- Git - Git
-- Configure / set user name and email - Configure / set user name and email
- SSH - SSH
-- MOTD (Template, replacable, displayed on login.) - MOTD (Template, replacable, displayed on login.)
-- PAM (Template, replacable, authusers file to bypass) - PAM (Template, replacable, authusers file to bypass)
-- authusers (Add users to file to bypass PAM settings) - authusers (Add users to file to bypass PAM settings)
- Vim - Vim
-- Install Vim - Install Vim
-- Run https://github.com/shaunrd0/klips/scripts/setup-vim.sh - Run https://github.com/shaunrd0/klips/blob/master/scripts/setup-vim.sh
docker docker

View File

@ -5,14 +5,14 @@ A simple role for configuring a set of packages / settings on a new Ubuntu host
Packages Added / Configured Packages Added / Configured
- Git - Git
-- Configure / set user name and email - Configure / set user name and email
- SSH - SSH
-- MOTD (Template, replacable, displayed on login.) - MOTD (Template, replacable, displayed on login.)
-- PAM (Template, replacable, authusers file to bypass) - PAM (Template, replacable, authusers file to bypass)
-- authusers (Add users to file to bypass PAM settings) - authusers (Add users to file to bypass PAM settings)
- Vim - Vim
-- Install Vim - Install Vim
-- Run https://github.com/shaunrd0/klips/scripts/setup-vim.sh - Run https://github.com/shaunrd0/klips/scripts/setup-vim.sh
Requirements Requirements
------------ ------------
@ -34,23 +34,23 @@ hostname: "localhost"
domain_name: "www.localhost.com" domain_name: "www.localhost.com"
``` ```
Basic package installation variable - #### Basic package installation variable -
packages - A list of packages to install when running core configuration. Add package to this list and it will be installed on your new host. Further configuration will need to be done manually, unless the role is modified otherwise. packages - A list of packages to install when running core configuration. Add package to this list and it will be installed on your new host. Further configuration will need to be done manually, unless the role is modified otherwise.
SSH Configuration Variables - #### SSH Configuration Variables -
ssh_port - The port to configure SSH to listen on ssh_port - The port to configure SSH to listen on
auth_methods - Authentication methods to allow SSH base configuration to use. Otherwise, specify a match within the sshd_config auth_methods - Authentication methods to allow SSH base configuration to use. Otherwise, specify a match within the sshd_config
MOTD Configuration Variables - #### MOTD Configuration Variables -
hostname - The hostname of the box you are using, used in the MOTD for a host-specific greeting, so you know which host you are logged into when glancing between terminals. hostname - The hostname of the box you are using, used in the MOTD for a host-specific greeting, so you know which host you are logged into when glancing between terminals.
domain_name - The domain name, if available, associated with this host. domain_name - The domain name, if available, associated with this host.
Git Configuration Variables - #### Git Configuration Variables -
git_email - Email address to configure with Git git_email - Email address to configure with Git

View File

@ -17,6 +17,8 @@ Found in `.../roles/docker/defaults/main.yml`
docker_users: [user1, user2] docker_users: [user1, user2]
``` ```
#### Docker Group Configuration Variable -
docker_users - A list of users to configure / add to the docker group docker_users - A list of users to configure / add to the docker group
Example Playbook Example Playbook

View File

@ -19,7 +19,7 @@ nginx_root_dir: "/var/www/html/"
index_files: "index.html index.htm" index_files: "index.html index.htm"
``` ```
NGINX Configuration Variables - #### NGINX Configuration Variables -
domain_name - Domain name to be used in nginx.conf, default value is the same as nginx base package default setting (localhost) domain_name - Domain name to be used in nginx.conf, default value is the same as nginx base package default setting (localhost)

View File

@ -4,27 +4,30 @@ I write these scripts for my own use, and you may need to tweak them slightly to
Never run a script you can't read or understand. Comments can be found in the scripts, usually explaining them block-by-block. Below is my personal use cases for the scripts, to provide further insight into how I use them and how they might be useful to you. Never run a script you can't read or understand. Comments can be found in the scripts, usually explaining them block-by-block. Below is my personal use cases for the scripts, to provide further insight into how I use them and how they might be useful to you.
#### adduser.sh adduser.sh
------------
This script was made on Ubuntu when creating a few users across multiple hosts. Syntax requires at least 2 arguments when running the script, otherwise help text will be output warning of correct usage and available options. The script can be used to configure sudo on a new user if the script itself is ran with sudo. Otherwise, creating a default user with or without a password is possible without sudo. If the script is ran on an existing user or a userID that is already in use is passed, no changes will happen in user-creation but you may still allow the user to sudo and change their password. This script was made on Ubuntu when creating a few users across multiple hosts. Syntax requires at least 2 arguments when running the script, otherwise help text will be output warning of correct usage and available options. The script can be used to configure sudo on a new user if the script itself is ran with sudo. Otherwise, creating a default user with or without a password is possible without sudo. If the script is ran on an existing user or a userID that is already in use is passed, no changes will happen in user-creation but you may still allow the user to sudo and change their password.
Syntax - Syntax -
./adduser (Help text) `./adduser` (Help text)
./adduser jeff 1005 (Create user jeff with userID 1005, can't configure sudo, prompt for possible password creation) `./adduser jeff 1005` (Create user jeff with userID 1005, can't configure sudo, prompt for possible password creation)
sudo ./adduser (Help text) `sudo ./adduser` (Help text)
sudo ./adduser jeffy 1010 (Create user jeffy with userID 1010, can configure sudo, possible password creation) `sudo ./adduser jeffy 1010` (Create user jeffy with userID 1010, can configure sudo, possible password creation)
Didn't configure sudo, and don't want to do so manually? Re-run the script on the existing user just as above, and accept the prompt for sudo configuration. Didn't configure sudo, and don't want to do so manually? Re-run the script on the existing user just as above, and accept the prompt for sudo configuration.
sudo ./adduser jeff 1005 (User creation will fail, follow prompts to configure sudo and / or reset user password) `sudo ./adduser jeff 1005` (User creation will fail, follow prompts to configure sudo and / or reset user password)
#### cmake-build.sh cmake-build.sh
------------
I usually run this script within whatever directory I'm working in, hence the infinite loop, I leave the script running until I'm done with my work and move to a new directory / cmake project. I usually run this script within whatever directory I'm working in, hence the infinite loop, I leave the script running until I'm done with my work and move to a new directory / cmake project.
#### setup-vim.sh setup-vim.sh
------------
To use this script, copy it to a safe directory where we can store previous / future vimrc configurations and run it as a user with sudo privelages. See below for example commands and output. To use this script, copy it to a safe directory where we can store previous / future vimrc configurations and run it as a user with sudo privelages. See below for example commands and output.