chore(make)!: task commands easier and ansible.cfg
Signed-off-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
8 files changed
+47
-144
No files matched your search
+10
-14
@@ -14,7 +14,8 @@ tasks:
|
||||
desc: Upgrade Ansible galaxy deps
|
||||
dir: provision/ansible
|
||||
cmds:
|
||||
- "ansible-galaxy install -r requirements.yml --force"
|
||||
- "ansible-galaxy install -r requirements.yml --roles-path ~/.ansible/roles --force"
|
||||
- "ansible-galaxy collection install -r requirements.yml --collections-path ~/.ansible/collections --force"
|
||||
|
||||
list:
|
||||
desc: List all the hosts
|
||||
@@ -22,49 +23,44 @@ tasks:
|
||||
cmds:
|
||||
- "ansible all -i {{.ANSIBLE_INVENTORY_DIR}}/hosts.yml --list-hosts"
|
||||
|
||||
playbook:ubuntu-prepare:
|
||||
prepare:
|
||||
desc: Prepare all the k8s nodes for running k3s
|
||||
dir: provision/ansible
|
||||
cmds:
|
||||
- "ansible-playbook -i {{.ANSIBLE_INVENTORY_DIR}}/hosts.yml {{.ANSIBLE_PLAYBOOK_DIR}}/ubuntu-prepare.yml"
|
||||
|
||||
playbook:ubuntu-upgrade:
|
||||
desc: Upgrade all the k8s nodes operating system
|
||||
dir: provision/ansible
|
||||
cmds:
|
||||
- "ansible-playbook -i {{.ANSIBLE_INVENTORY_DIR}}/hosts.yml {{.ANSIBLE_PLAYBOOK_DIR}}/ubuntu-upgrade.yml"
|
||||
|
||||
playbook:k3s-install:
|
||||
install:
|
||||
desc: Install Kubernetes on the nodes
|
||||
dir: provision/ansible
|
||||
cmds:
|
||||
- "ansible-playbook -i {{.ANSIBLE_INVENTORY_DIR}}/hosts.yml {{.ANSIBLE_PLAYBOOK_DIR}}/k3s-install.yml"
|
||||
|
||||
playbook:k3s-nuke:
|
||||
nuke:
|
||||
desc: Uninstall Kubernetes on the nodes
|
||||
dir: provision/ansible
|
||||
cmds:
|
||||
- "ansible-playbook -i {{.ANSIBLE_INVENTORY_DIR}}/hosts.yml {{.ANSIBLE_PLAYBOOK_DIR}}/k3s-nuke.yml"
|
||||
- "ansible kubernetes -i {{.ANSIBLE_INVENTORY_DIR}}/hosts.yml -a '/usr/bin/systemctl reboot' --become"
|
||||
|
||||
adhoc:ping:
|
||||
ping:
|
||||
desc: Ping all the hosts
|
||||
dir: provision/ansible
|
||||
cmds:
|
||||
- "ansible all -i {{.ANSIBLE_INVENTORY_DIR}}/hosts.yml --one-line -m 'ping'"
|
||||
|
||||
adhoc:uptime:
|
||||
uptime:
|
||||
desc: Uptime of all the hosts
|
||||
dir: provision/ansible
|
||||
cmds:
|
||||
- ansible all -i {{.ANSIBLE_INVENTORY_DIR}}/hosts.yml --one-line -a 'uptime'
|
||||
|
||||
adhoc:reboot:
|
||||
reboot:
|
||||
desc: Reboot all the k8s nodes
|
||||
dir: provision/ansible
|
||||
cmds:
|
||||
- "ansible kubernetes -i {{.ANSIBLE_INVENTORY_DIR}}/hosts.yml -a '/usr/bin/systemctl reboot' --become"
|
||||
|
||||
adhoc:poweroff:
|
||||
poweroff:
|
||||
desc: Shutdown all the k8s nodes
|
||||
dir: provision/ansible
|
||||
cmds:
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
---
|
||||
version: "3"
|
||||
|
||||
tasks:
|
||||
sync:
|
||||
desc: Sync flux-system with the Git Repository
|
||||
cmds:
|
||||
- flux reconcile source git flux-system
|
||||
silent: true
|
||||
@@ -1,33 +0,0 @@
|
||||
---
|
||||
version: "3"
|
||||
|
||||
tasks:
|
||||
all:
|
||||
- task: markdown
|
||||
- task: yaml
|
||||
markdown:
|
||||
desc: Format Markdown
|
||||
cmds:
|
||||
- >-
|
||||
prettier
|
||||
--ignore-path '.github/linters/.prettierignore'
|
||||
--config '.github/linters/.prettierrc.yaml'
|
||||
--list-different
|
||||
--ignore-unknown
|
||||
--parser=markdown
|
||||
--write '*.md' '**/*.md'
|
||||
ignore_error: true
|
||||
yaml:
|
||||
desc: Format YAML
|
||||
cmds:
|
||||
- >-
|
||||
prettier
|
||||
--ignore-path '.github/linters/.prettierignore'
|
||||
--config
|
||||
'.github/linters/.prettierrc.yaml'
|
||||
--list-different
|
||||
--ignore-unknown
|
||||
--parser=yaml
|
||||
--write '*.y*ml'
|
||||
'**/*.y*ml'
|
||||
ignore_error: true
|
||||
@@ -1,26 +0,0 @@
|
||||
---
|
||||
version: "3"
|
||||
|
||||
tasks:
|
||||
all:
|
||||
- task: markdown
|
||||
- task: yaml
|
||||
- task: format
|
||||
|
||||
markdown:
|
||||
desc: Lint Markdown
|
||||
cmds:
|
||||
- markdownlint -c '.github/linters/.markdownlint.yaml' *.md **/*.md
|
||||
ignore_errors: true
|
||||
|
||||
yaml:
|
||||
desc: Lint YAML
|
||||
cmds:
|
||||
- yamllint -c '.github/linters/.yamllint.yaml' .
|
||||
ignore_errors: true
|
||||
|
||||
format:
|
||||
desc: Lint general formatting
|
||||
cmds:
|
||||
- prettier --ignore-path '.github/linters/.prettierignore' --config '.github/linters/.prettierrc.yaml' --check .
|
||||
ignore_errors: true
|
||||
@@ -3,19 +3,19 @@ version: "3"
|
||||
|
||||
tasks:
|
||||
|
||||
init:cloudflare:
|
||||
init:
|
||||
desc: Initialize terraform
|
||||
dir: provision/terraform/cloudflare
|
||||
cmds:
|
||||
- "terraform init"
|
||||
|
||||
plan:cloudflare:
|
||||
plan:
|
||||
desc: Prepare all the k8s nodes for running k3s
|
||||
dir: provision/terraform/cloudflare
|
||||
cmds:
|
||||
- "terraform plan"
|
||||
|
||||
apply:cloudflare:
|
||||
apply:
|
||||
desc: Prepare all the k8s nodes for running k3s
|
||||
dir: provision/terraform/cloudflare
|
||||
cmds:
|
||||
|
||||
Reference in new issue
Block a user