Submodule change
This commit is contained in:
parent
f707b75e6b
commit
92ec91ad6f
|
@ -0,0 +1,4 @@
|
|||
To install these hooks:
|
||||
```
|
||||
git config core.hooksPath .githooks
|
||||
```
|
|
@ -0,0 +1,38 @@
|
|||
#!/usr/bin/env zsh
|
||||
set +o xtrace -o errexit -o nounset -o pipefail
|
||||
|
||||
#
|
||||
# Manual check in terminal:
|
||||
#
|
||||
# ansible-lint ./*.yml
|
||||
#
|
||||
|
||||
export ANSIBLE_ROLES_PATH="$PWD/roles"
|
||||
FILES_PATTERN='\.yml$'
|
||||
EXIT_CODE=0
|
||||
|
||||
# Output to stderr
|
||||
exec 1>&2
|
||||
|
||||
CHANGED_FILES=()
|
||||
for FILE in $(git diff --cached --name-only --diff-filter=ACM | grep --extended-regexp "${FILES_PATTERN}" | grep -Ev '^\.circleci'); do
|
||||
CHANGED_FILES+=("${FILE}")
|
||||
done
|
||||
|
||||
if [ 0 -eq "${#CHANGED_FILES[@]}" ]; then
|
||||
echo "No changed files matching '${FILES_PATTERN}'"
|
||||
else
|
||||
# echo "Running ansible-lint --write..."
|
||||
# Have to add the playbooks in the root to make ansible-lint detect every problem
|
||||
# ansible-lint -qq --write --nocolor "${CHANGED_FILES[@]}" >/dev/null && true
|
||||
# ansible-lint -qq --skip-list 'yaml[line-length],jinja[spacing]' --write --nocolor ./*.yml
|
||||
# git add "${CHANGED_FILES[@]}"
|
||||
echo -e "Running ansible-lint...\n"
|
||||
# set -o xtrace
|
||||
ansible-lint --nocolor ./*.yml "${CHANGED_FILES[@]}"
|
||||
{ set +o xtrace; } 2>/dev/null
|
||||
EXIT_CODE="$?"
|
||||
fi
|
||||
|
||||
echo "Exit code ${EXIT_CODE}"
|
||||
exit "${EXIT_CODE}"
|
|
@ -1,3 +1,3 @@
|
|||
[submodule "roles/snel.kubernetes-cluster"]
|
||||
path = roles/snel.kubernetes-cluster
|
||||
[submodule "playbooks/snel.kubernetes-cluster"]
|
||||
path = playbooks/snel.kubernetes-cluster
|
||||
url = git@git.snel.com:snelcom-ansible/snel.kubernetes-cluster.git
|
||||
|
|
|
@ -11,9 +11,9 @@ git clone --recurse-submodules git@git.snel.com:snelcom-ansible/snel.ansible.
|
|||
## Install on MacOS
|
||||
```zsh
|
||||
brew install ansible ansible-lint packer jq siderolabs/talos/talosctl kubernetes-cli helm
|
||||
./requirements.txt
|
||||
./requirements.yml
|
||||
python3 -m pip install --upgrade --requirement ./requirements.txt
|
||||
ansible-galaxy install --force --role-file ./requirements.yml
|
||||
git config core.hooksPath .githooks
|
||||
grep 'OBJC_DISABLE_INITIALIZE_FORK_SAFETY' ~/.zshrc || echo "OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES" >> ~/.zshrc
|
||||
source ~/.bash_profile
|
||||
source ~/.zshrc
|
||||
```
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
---
|
||||
kubernetes:
|
||||
children:
|
||||
ansible_host:
|
||||
hosts:
|
||||
localhost:
|
||||
talos:
|
||||
children:
|
||||
customer_deovero:
|
||||
vars:
|
||||
cluster_name: deovero.k8s.snel.com
|
||||
hosts:
|
||||
c1.deovero.k8s.snel.com:
|
||||
ansible_remote: 185.62.56.239
|
||||
c2.deovero.k8s.snel.com:
|
||||
ansible_remote: 185.62.58.208
|
||||
c3.deovero.k8s.snel.com:
|
||||
ansible_remote: 185.62.56.102
|
||||
w1.deovero.k8s.snel.com:
|
||||
ansible_remote: 185.62.58.15
|
||||
w2.deovero.k8s.snel.com:
|
||||
ansible_remote: 185.62.56.96
|
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
ansible_port: 22
|
||||
ansible_user: root
|
||||
ntp_server: europe.pool.ntp.org
|
||||
deb_architecture:
|
||||
aarch64: "arm64"
|
||||
armv6l: "armhf"
|
||||
armv7l: "armhf"
|
||||
i386: "i386"
|
||||
x86_64: "amd64"
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
|
||||
ansible_connection: local
|
||||
ansible_python_interpreter: "{{ ansible_playbook_python }}"
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 9351f64a03ffdfa0a57ab8c5ee7d06f3d8e00b42
|
Loading…
Reference in New Issue