klips/README.md

75 lines
2.8 KiB
Markdown
Raw Normal View History

2019-07-21 04:20:55 +00:00
# klips
2019-08-31 06:47:50 +00:00
This repository is a collection of code snippets that I reuse, clone, or frequently refer to. This can be cloned as a whole or just viewed / copied as needed, used to lay out templates / automate tasks for larger projects.
The snippets are organized within topic-labeled folders. 'plates' is short-hand for templates, and houses all folders / projects that can be copied and edited / adjusted locally as templates for larger projects.
Other directories could contain configuration files, bash exports, scripts, etc.
All snippets will be listed below with the directories in the master branch. If you are not on master, I cant guarentee anything will be anywhere unless otherwise described.
### Contents
```
2019-07-26 19:08:59 +00:00
https://github.com/shaunrd0/...
klips/
2019-08-24 06:21:34 +00:00
├── ansible
│   ├── apt-up.yml
2019-08-31 06:47:50 +00:00
│   ├── core.yml
│   ├── docker.yml
2019-08-24 06:21:34 +00:00
│   ├── hosts
2019-08-31 06:47:50 +00:00
│   ├── make-host.yml
2019-08-24 06:21:34 +00:00
│   ├── nginx.yml
│   └── roles
2019-08-31 06:47:50 +00:00
│   ├── core
│   ├── docker
│   └── nginx
2019-08-24 06:21:34 +00:00
├── configs
2020-03-27 11:11:16 +00:00
│   └── .vimrc
2019-08-24 06:21:34 +00:00
├── plates
│   ├── cpp-cmake
│   └── cpp-launcher
├── README.md
├── refs
│   └── doxygenROT
└── scripts
2019-08-31 06:47:50 +00:00
├── adduser.sh
2019-08-24 06:21:34 +00:00
├── cmake-build.sh
├── README.md
└── setup-vim.sh
```
2019-08-31 07:01:59 +00:00
### ansible
Ansible roles, playbooks
2019-08-31 07:08:24 +00:00
Playbooks
2019-08-24 06:29:00 +00:00
- apt-up.yml - Playbook to update servers / groups ad hoc
2019-08-31 06:47:50 +00:00
- core.yml - Playbook example for using core configuration role
- docker.yml - Playbook example for using docker install role (Debian / Ubuntu)
2019-08-31 07:01:59 +00:00
- hosts - Sample / partially default ansible hosts file
2019-08-31 06:47:50 +00:00
- make-host.yml - Playbook example for using multiple roles together to create a new host
2019-08-31 07:08:24 +00:00
- nginx.yml - Playbook example for using nginx role
Roles
- Basic ansible role created with ansible-galaxy command
- 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)
- nginx - Role to install and configure a new nginx webserver on a host
2019-08-31 06:47:50 +00:00
2019-08-31 07:01:59 +00:00
### configs
2019-08-31 06:47:50 +00:00
- .vimrc - Various settings for vim, can be copied or used with setup-vim.sh)
2019-08-24 06:21:34 +00:00
2019-08-31 07:01:59 +00:00
### plates
2019-08-24 06:29:00 +00:00
- cpp-cmake - Simple cpp executable template, built using cmake
- cpp-launcher - Simple cpp launcher template, built using cmake. Easily expandable.
2019-08-24 06:21:34 +00:00
2019-08-31 07:01:59 +00:00
### scripts
2019-08-31 07:08:24 +00:00
adduser.sh - Script to add new user, run with sudo if you want to configure / allow user to sudo
- `./adduser` - (Print help text)
- `./adduser <name> <userID>` - (Don't need sudo if new user doesn't need it)
- `sudo ./adduser <name> <userID>`
- `sudo ./adduser jeff 1005` - (Create jeff user and assign userID to 1005)
- Follow prompts to configure password / sudo depending on needs of new user