ansible
This commit is contained in:
parent
6fd9519cb2
commit
75eb90b51d
5 changed files with 59 additions and 0 deletions
13
.ansible/cluster.yaml
Normal file
13
.ansible/cluster.yaml
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
---
|
||||||
|
# - name: Install tailscale
|
||||||
|
# hosts: k3s_cluster
|
||||||
|
# roles:
|
||||||
|
# - role: artis3n.tailscale.device
|
||||||
|
# vars:
|
||||||
|
# tailscale_up_skip: true
|
||||||
|
- name: Build a cluster
|
||||||
|
hosts: k3s_cluster
|
||||||
|
vars:
|
||||||
|
k3s_become: true
|
||||||
|
roles:
|
||||||
|
- role: xanmanning.k3s
|
30
.ansible/inventory.yaml
Normal file
30
.ansible/inventory.yaml
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
---
|
||||||
|
k3s_cluster:
|
||||||
|
hosts:
|
||||||
|
oracle-master-1:
|
||||||
|
ansible_host: 130.61.173.37
|
||||||
|
k3s_control_node: true
|
||||||
|
k3s_server:
|
||||||
|
# write-kubeconfig-mode: 777
|
||||||
|
write-kubeconfig-mode: 777
|
||||||
|
vpn-auth: "name=tailscale,controlServerURL=https://headscale.kmsign.ru,joinKey=544cd542cee22ea076d01c2d87b9cc606525b31fe966b168,extraArgs=--advertise-tags=tag:cloud-cluster"
|
||||||
|
advertise-address: "130.61.173.37"
|
||||||
|
tls-san:
|
||||||
|
- "130.61.173.37"
|
||||||
|
|
||||||
|
murino-worker-1:
|
||||||
|
ansible_user: root
|
||||||
|
ansible_host: 192.168.220.17
|
||||||
|
k3s_agent:
|
||||||
|
vpn-auth: "name=tailscale,controlServerURL=https://headscale.kmsign.ru,joinKey=544cd542cee22ea076d01c2d87b9cc606525b31fe966b168,extraArgs=--advertise-tags=tag:cloud-cluster"
|
||||||
|
|
||||||
|
# kube-2:
|
||||||
|
# ansible_host: 152.70.184.40
|
||||||
|
# k3s_state: uninstalled
|
||||||
|
|
||||||
|
vars:
|
||||||
|
ansible_port: 22
|
||||||
|
ansible_user: ubuntu
|
||||||
|
ansible_python_interpreter: /usr/bin/python3
|
||||||
|
k3s_server:
|
||||||
|
write-kubeconfig-mode: 777
|
8
.ansible/requirements.yml
Normal file
8
.ansible/requirements.yml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
collections:
|
||||||
|
- name: ansible.utils
|
||||||
|
- name: community.general
|
||||||
|
- name: ansible.posix
|
||||||
|
- name: kubernetes.core
|
||||||
|
- name: artis3n.tailscale
|
||||||
|
roles:
|
||||||
|
- name: xanmanning.k3s
|
6
.vscode/settings.json
vendored
Normal file
6
.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"yaml.schemas": {
|
||||||
|
"https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/ansible.json#/$defs/playbook": "file:///home/royalcat/projects/cloud-cluster/.ansible/cluster.yaml",
|
||||||
|
"https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/inventory.json": "file:///home/royalcat/projects/cloud-cluster/.ansible/inventory.yaml"
|
||||||
|
}
|
||||||
|
}
|
2
Makefile
Normal file
2
Makefile
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
ansible-k3s-site:
|
||||||
|
ansible-playbook cluster.yaml -i inventory.yaml
|
Loading…
Reference in a new issue