Added base for k8s playbook repo

This commit is contained in:
Vlad R 2023-03-15 12:13:51 +00:00
parent 425ebbebcb
commit 6f7d1f9bd3
5 changed files with 59 additions and 14 deletions

View File

@ -4,22 +4,15 @@ all:
services:
hosts:
ubuntu.dnaclab.net:
telemetry:
hosts:
telemetry.dnaclab.net:
developer:
hosts:
developer.dnaclab.net:
gitlab:
hosts:
gitlab.dnaclab.net:
test:
kubernetes:
hosts:
test.dnaclab.net:
all_servers:
hosts:
ubuntu.dnaclab.net:
telemetry.dnaclab.net:
developer.dnaclab.net:
gitlab.dnaclab.net:
test.dnaclab.net:
10.221.0.130:
10.221.0.131:
10.221.0.132:

View File

@ -1,6 +1,6 @@
---
- name: Reboots linux host and checks status
hosts: all_servers
hosts: all
become: yes
vars_files:
- global_vars/main.yml
@ -19,4 +19,4 @@
recipient_id: "{{ webex_id }}"
msg_type: markdown
personal_token: "{{ webex_token }}"
msg: "**Host {{ inventory_hostname }} has successfully rebooted.**"
msg: "**Host {{ inventory_hostname }} has successfully rebooted.**"

View File

@ -0,0 +1,21 @@
---
- name: Update and upgrade current packages
ansible.builtin.apt:
update_cache: yes
upgrade: yes
- name: Create a user with sudo privileges which will be used for managing the host via SSH
ansible.builtin.user:
name: "{{ local_user }}"
state: present
groups: sudo
append: true
create_home: true
shell: /bin/bash
password: "{{ local_password }}"
- name: Set authorized key for remote SSH access (passwordless login)
ansible.posix.authorized_key:
user: "{{ local_user }}"
state: present
key: "{{ local_key }}"

View File

@ -0,0 +1,22 @@
$ANSIBLE_VAULT;1.1;AES256
37666465316439393863333939643838623635333130646232353430343535623233636261343963
6463636434646265636535356132343031366536633633630a393830373865656532313466663937
33326237613537363739653837346165363466313430663262356134666530623135343234373034
3432306232626166330a643261353639653866633662633431376436626562343134316362326330
64643233303235303339353062323765643061626437393138613966386465376438616634373334
32626230346461633364613863356631653838616161333438383662623431353530306236306663
32376134623266623136316630373136653965336162646662393030386536353938323935393935
33303336653933393532663065653935643066636435616633613165613163643430326164336134
64653166633362666463306463336338663061346538326631393732623164326135616162613637
35313439613635623632326636326665626665633732626533323336366539623038623334323931
65383032643639623561666134393565343830326537323330373963363461663731366663643565
32306634343837626566376132643438633361613935323766383464303432366334663961353464
61313030663335613735656135666464353463313764393034616463383466363765303435363335
38316330393037616665666264633234613837663933333131306164663732326662663034613164
31663866333162643630383930353734646561326236656562666262653937623563646639343461
38396238323862613733313433306133313131353030623931666566613465353165643865316530
61623534326664653238356537326163633138336165653838653065393033363831373830386635
64336463333834393430376136373065653463323761643138346465386438343465333365663063
35353035333863373566623339363333633130343932353432616236656531663266363131663761
36393531313561333037343861623163393962613930306365363634356236306133643261313939
3834

9
kubernetes/inventory.yml Normal file
View File

@ -0,0 +1,9 @@
---
all:
children:
kubernetes:
hosts:
10.221.0.130:
10.221.0.131:
10.221.0.132: