Thank you everybody, Your comments makes it better
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"| tee /usr/lib/systemd/system/octant.service <<-'EOF' | |
| [Unit] | |
| Description=octant | |
| [Service] | |
| Environment="HOME=/root" | |
| Environment="OCTANT_ACCEPTED_HOSTS=10.45.112.173" | |
| Environment="KUBECONFIG=/home/livefire/.kube/config" | |
| Environment="OCTANT_LISTENER_ADDR=0.0.0.0:8900" |
| version: '3.7' | |
| services: | |
| elasticsearch: | |
| image: elasticsearch:7.9.2 | |
| ports: | |
| - '9200:9200' | |
| environment: | |
| - discovery.type=single-node | |
| ulimits: |
| #Update system & reboot | |
| sudo apt update && sudo apt -y upgrade | |
| sudo reboot | |
| #Install Asterisk 16 LTS dependencies | |
| sudo apt -y install git curl wget libnewt-dev libssl-dev libncurses5-dev subversion libsqlite3-dev build-essential libjansson-dev libxml2-dev uuid-dev | |
| #Add universe repository and install subversio | |
| sudo add-apt-repository universe | |
| sudo apt update && sudo apt -y install subversion |
| - name: "get files from dir" | |
| find: | |
| paths: "/some/dir/foo" | |
| register: found_files | |
| - name: print file names without path | |
| debug: | |
| msg: "{{ found_files['files'] | map(attribute='path') | map('regex_replace','^.*/(.*)$','\\1') | list }}" |
| # Install K3S | |
| curl -sfL https://get.k3s.io | sh - | |
| # Copy k3s config | |
| mkdir $HOME/.kube | |
| sudo cp /etc/rancher/k3s/k3s.yaml $HOME/.kube/config | |
| sudo chmod 644 $HOME/.kube/config | |
| # Check K3S | |
| kubectl get pods -n kube-system |
Thank you everybody, Your comments makes it better
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"| #!/bin/bash | |
| # Converting environment to bash variables | |
| export $(cat .env | xargs) |
| for container in `docker ps -q`; do | |
| # show the name of the container | |
| docker inspect --format='{{.Name}}' $container; | |
| # run the command (date in the case) | |
| docker exec -it $container date; | |
| done |
| vi /etc/environment | |
| add these lines... | |
| LANG=en_US.utf-8 | |
| LC_ALL=en_US.utf-8 |
| $ git config --global core.excludesfile ~/.gitignore | |
| $ echo .DS_Store >> ~/.gitignore |