+ refactored and solve some problems with mariadb and nginx playbook
+ apps playbooks - docker, caprover * simple refactore starter scripts + apt update debops playboook prepend launch by default * sury repo changed * database users locked to localhost only * phpmyadmin blowfish generate secret fix
This commit is contained in:
@ -1,30 +1,40 @@
|
||||
---
|
||||
- hosts: [ 'debian10' ]
|
||||
tasks:
|
||||
- name: Install yadm
|
||||
become_user: root
|
||||
shell: |
|
||||
command -v yadm || curl -sfLo /usr/local/bin/yadm https://github.com/TheLocehiliosan/yadm/raw/master/yadm && chmod a+x /usr/local/bin/yadm
|
||||
|
||||
- name: Install direnv
|
||||
become_user: root
|
||||
shell: |
|
||||
command -v direnv || curl -sfLo /usr/local/bin/direnv https://github.com/direnv/direnv/releases/download/v2.35.0/direnv.linux-amd64 && chmod a+x /usr/local/bin/direnv
|
||||
command -v direnv > /dev/null || {
|
||||
curl -sfLo /usr/local/bin/direnv https://github.com/direnv/direnv/releases/download/v2.35.0/direnv.linux-amd64 && \
|
||||
chmod a+x /usr/local/bin/direnv
|
||||
}
|
||||
|
||||
- name: Install Starship
|
||||
become_user: root
|
||||
shell: |
|
||||
command -v starship || curl -sS https://starship.rs/install.sh | sh -s -- -f
|
||||
command -v starship> /dev/null || {
|
||||
curl -sS https://starship.rs/install.sh | sh -s -- -f
|
||||
}
|
||||
|
||||
- name: Clone dotfiles repo
|
||||
- name: Install with init or update yadm
|
||||
become_user: root
|
||||
shell: |
|
||||
yadm clone --bootstrap https://vcs.wpstudio.ru/gitea/dotfiles.git && yadm checkout ./
|
||||
command -v yadm && {
|
||||
yadm remote set-url origin https://vcs.wpstudio.ru/gitea/dotfiles.git
|
||||
rm -rf .tmux/plugins/tmux-ip-address
|
||||
yadm pull && yadm checkout .
|
||||
} || {
|
||||
curl -sfLo /usr/local/bin/yadm https://github.com/TheLocehiliosan/yadm/raw/master/yadm && chmod a+x /usr/local/bin/yadm
|
||||
yadm clone --bootstrap https://vcs.wpstudio.ru/gitea/dotfiles.git && yadm checkout .
|
||||
}
|
||||
|
||||
# For manual change: sed -i 's/#/\\$/g' ${HOME}/.config/starship.toml
|
||||
- name: 'Change character for non-root user'
|
||||
become: false
|
||||
become_user: root
|
||||
shell: |
|
||||
sed -i 's/#/\\$/g' ${HOME}/.config/starship.toml
|
||||
HOME_USER=$(ls /home)
|
||||
test ! -z "${HOME_USER}" && su --login ${HOME_USER} -c 'yadm clone --bootstrap https://vcs.wpstudio.ru/gitea/dotfiles.git && yadm checkout .'
|
||||
test ! -z "${HOME_USER}" && su --login ${HOME_USER} -c 'sed -i "s/#/\\$/g" ${HOME}/.config/starship.toml'
|
||||
exit 0
|
||||
args:
|
||||
executable: /bin/bash
|
||||
executable: /bin/bash
|
||||
|
||||
Reference in New Issue
Block a user