All Projects → tasdikrahman → ansible-bootstrap-server

tasdikrahman / ansible-bootstrap-server

Licence: GPL-3.0 license
the bare essentials when you spin up a server

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to ansible-bootstrap-server

ansible-role-mysql
Ansible Role - MySQL and MariaDB
Stars: ✭ 28 (+100%)
Mutual labels:  ansible-role
tomcat role
Ansible role to install Apache Tomcat Java Servlet Container
Stars: ✭ 13 (-7.14%)
Mutual labels:  ansible-role
seedbox
Baremetal CoreOS cluster provisioner with web UI
Stars: ✭ 23 (+64.29%)
Mutual labels:  provisioning
ansible role proxmox
Ansible role to provision containers in Proxmox VE virtualization
Stars: ✭ 42 (+200%)
Mutual labels:  ansible-role
ansible-role-etcd
Ansible role for installing etcd cluster
Stars: ✭ 38 (+171.43%)
Mutual labels:  ansible-role
cis ubuntu 2004
💻 Ansible Role for applying CIS Benchmark for Ubuntu Linux 20.04 LTS (hardening).
Stars: ✭ 30 (+114.29%)
Mutual labels:  ansible-role
ansible-role-win-ec2
Ansible role to create and destroy Windows instances on EC2
Stars: ✭ 13 (-7.14%)
Mutual labels:  ansible-role
quads
📆 The infrastructure deployment time machine
Stars: ✭ 74 (+428.57%)
Mutual labels:  provisioning
ansible-role-pacemaker
Ansible role to deploy Pacemaker HA clusters
Stars: ✭ 19 (+35.71%)
Mutual labels:  ansible-role
ansible-bluegreen-docker
Ansible role, showing a concept of blue-green deployments with Docker containers
Stars: ✭ 23 (+64.29%)
Mutual labels:  ansible-role
ansible-role-admin-users
Ansible role to manage admin users, authorized keys and sudo access.
Stars: ✭ 18 (+28.57%)
Mutual labels:  ansible-role
ansible-role-do-agent
Cross-distro installation of the DigitalOcean monitoring agent
Stars: ✭ 22 (+57.14%)
Mutual labels:  ansible-role
ansible-mdadm
No description or website provided.
Stars: ✭ 48 (+242.86%)
Mutual labels:  ansible-role
Windows-2012-Member-Server-STIG
Ansible role for the Windows 2012 Member Server STIG
Stars: ✭ 12 (-14.29%)
Mutual labels:  ansible-role
ansible-role-containerd
Ansible Role - containerd.io
Stars: ✭ 45 (+221.43%)
Mutual labels:  ansible-role
partinfra-terraform
Terraform configuration for Participation Infrastructure
Stars: ✭ 46 (+228.57%)
Mutual labels:  provisioning
ansible-haproxy
Installs and configures HAProxy
Stars: ✭ 19 (+35.71%)
Mutual labels:  ansible-role
ansible-role-jitsi-meet
Ansible role to install & configure Jitsi Meet
Stars: ✭ 39 (+178.57%)
Mutual labels:  ansible-role
bedrock-site-protect
Ansible role: Add htpasswd protection to Trellis (Bedrock-Ansible) WordPress sites.
Stars: ✭ 79 (+464.29%)
Mutual labels:  ansible-role
ansible-drone
Ansible role to configure drone (server and agent)
Stars: ✭ 16 (+14.29%)
Mutual labels:  ansible-role

ansible-bootstrap-server

Build status

Targets Debian and RHEL based systems

  • bootstrap-server:

    Currently, it has roles for

    • update : update the apt-cache and upgrades it
    • install-minimal-packages : Installs some bare bones apt-packages
    • create-new-user: Creates a new user called {{ username }} (specified inside the defaults/main.yml) and copies the host's .ssh/id_rsa over to the new user's .ssh dir and adds this user to the sudoers list
      • specify your hashed password inside the file roles/create_new_user/defaults/main.yml
      • generate your hashed password using
     python -c 'import crypt; print crypt.crypt("<your-password>", "<your-key>")'
    • basic-server-hardening:
      • Disallow root SSH access
      • Disallow password authentication
      • Enable a basic firewall (ufw in this case )
    • vimrc-server-flavor: places the .vimrc server taken from my dotfiles and places it into the ~/.vimrc for the user {{ usnername }}
    • pip
      • Installs pip and mkvirtualenv for managing python virtual environments

Running it

NOTE: You need to have sshpass on your machine. Ref

For Mac

  • brew install https://raw.githubusercontent.com/kadwanev/bigboybrew/master/Library/Formula/sshpass.rb

For Debian based systems

  • apt-get install sshpass
$ cp inventory.example inventory
$ cat inventory.example
[remotenode]
<ip-addr>

[all:vars]
ansible_connection=ssh
ansible_ssh_user=root
ansible_ssh_pass=<your-pass>

If everything is good, check the ssh connection once

$ ansible -m ping -i inventory remotenode
<ip-addr> | SUCCESS => {
    "changed": false,
    "ping": "pong"
}

Change the variable in play.yml named your-username with the new user that you want to create

$ ansible-playbook play.yml -i inventory -vvv

LICENSE

GPLv3

Donation

If you have found my little bits of software being of any use to you, do consider helping me pay my internet bills :)

PayPal Donate via PayPal!
Gratipay Support via Gratipay
Patreon Support me on Patreon
£ (GBP) Donate via TransferWise!
€ Euros Donate via TransferWise!
₹ (INR) Donate via instamojo
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].