Merge pull request #2 from meienberger/fix/debian

Fix/debian
This commit is contained in:
Nicolas Meienberger 2022-04-15 12:29:15 +00:00 committed by GitHub
commit aa200bbc16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 36 additions and 17 deletions

1
README.md Normal file
View File

@ -0,0 +1 @@
[![forthebadge](https://svgshare.com/i/g4Y.svg)](https://forthebadge.com)

View File

@ -5,9 +5,9 @@ packages:
- iptables
- coreutils
- git
- base-devel
# - base-devel
- docker
- avahi
- avahi-daemon
- nodejs
- npm
# - libusb

View File

@ -1,8 +1,24 @@
- name: Install docker
package:
name: docker
name:
- docker
- ca-certificates
- curl
- gnupg
- lsb-release
state: latest
- name: Add docker gpg key
shell: curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
- name: Add deb
shell: echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian bullseye stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
- name: Update packages
apt:
update_cache: yes
upgrade: yes
- name: Install essential packages
package:
name:

View File

@ -1,22 +1,21 @@
- name: Change machine hostname to tipi.local
shell: hostnamectl set-hostname tipi.local
- name: Update packages
become: yes
pacman:
update_cache: yes
upgrade: yes
- name: Add user to root group
user:
name: "{{ username }}"
group: root
# - name: Update packages
# apt:
# update_cache: yes
# upgrade: yes
- name: Install essential packages
package:
name: "{{ packages }}"
state: latest
- name: Add user to root group
user:
name: "{{ username }}"
group: root
- name: Disable SSH password auth
lineinfile:
dest: /etc/ssh/sshd_config

View File

@ -1,6 +1,6 @@
- name: Install "pm2" package globally.
community.general.npm:
name: yarn
name: pm2
global: yes
- name: Run pm2 first time

View File

@ -1,3 +1,6 @@
#!/usr/bin/env bash
set -e # Exit immediately if a command exits with a non-zero status.
ROOT_FOLDER="$(readlink -f $(dirname "${BASH_SOURCE[0]}")/..)"
# Constants
@ -33,10 +36,9 @@ ENV_FILE="./templates/.env"
# Install ansible if not installed
if ! command -v ansible-playbook > /dev/null; then
echo "Installing Ansible..."
sudo apt-get install -y software-properties-common
sudo apt-add-repository -y ppa:ansible/ansible
sudo apt-get update
sudo apt-get install -y ansible
sudo apt-get install python3 python3-pip -y
sudo pip3 install ansible
fi
ansible-playbook ansible/setup.yml -i ansible/hosts -K

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash
set -e # Exit immediately if a command exits with a non-zero status.
# use greadlink instead of readlink on osx
if [[ "$(uname)" == "Darwin" ]]; then