Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/admin tools #22

Merged
merged 5 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
.output-images/
.vagrant/
.vscode/
galaxy_roles/*
roles/andrewrothstein.*
roles/bbaassssiiee.*
roles/geerlingguy.*
files/*
*.iso
*.box
Expand Down
4 changes: 2 additions & 2 deletions ansible.cfg
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[defaults]
; don't use smart fact caching because ansible_env changes inbetween plays.

roles_path = galaxy_roles:roles
roles_path = roles
; Debian default shell doesn't support pipefail option.
executable = /bin/bash

; set inventory here, or on the command-line when running Ansible.
; dev is for Vagrant with Hyper-V, VMWare Desktop or VirtualBox
; local is for localhost, assuming AlmaLinux or Rocky
inventory = inventory/local/hosts
inventory = inventory/dev/hosts

; Vagrant hosts are ephemeral set to true when promoting beyond test.
host_key_checking = False
Expand Down
3 changes: 0 additions & 3 deletions galaxy_roles/.gitkeep

This file was deleted.

10 changes: 10 additions & 0 deletions inventory/dev/group_vars/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,14 @@ docker_users:
- "{{ ansible_user }}"
docker_install_compose: true
docker_install_compose_plugin: true

use_helm: true
use_krew: true
kubectl_ver: v1.29.3
kubectl_install_dir: /usr/bin
krew_install_plugins:
- ctx
- ns
- stern

server_name: "{{ ansible_fqdn | default(ansible_hostname) }}"
9 changes: 3 additions & 6 deletions inventory/dev/hosts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[local]
localhost connection=local

[dev:children]
control

Expand All @@ -10,11 +7,11 @@ semaphore
web

[database]
controller ansible_host=10.0.0.206
controller ansible_host=192.168.178.60
[semaphore]
controller ansible_host=10.0.0.206
controller ansible_host=192.168.178.60
[web]
controller ansible_host=10.0.0.206
controller ansible_host=192.168.178.60

[dev:vars]
ansible_user=vagrant
Expand Down
12 changes: 11 additions & 1 deletion inventory/test/group_vars/all.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
---
docker_install_compose: true
docker_install_compose_plugin: true
server_name: acsNode

use_helm: true
use_krew: true
kubectl_ver: v1.29.3
kubectl_install_dir: /usr/bin
krew_install_plugins:
- ctx
- ns
- stern

postgres_listen_addresses: '127.0.0.1'
server_name: acsNode
2 changes: 1 addition & 1 deletion prepare.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
ansible-galaxy install -p galaxy_roles -r roles/requirements.yml --force
ansible-galaxy install -p roles -r roles/requirements.yml
ansible-galaxy collection install -r collections/requirements.yml
16 changes: 13 additions & 3 deletions provision.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
read -sp "Enter database password: " DB_PASS && export DB_PASS ; echo

roles:
- role: postgres
- role: bbaassssiiee.postgres_ssl

- name: Semaphore in Systemd
hosts: semaphore
Expand Down Expand Up @@ -63,7 +63,7 @@

- name: Install Squid proxy
ansible.builtin.import_role:
name: proxy
name: bbaassssiiee.proxy
tags: [proxy]

- name: Tools
Expand All @@ -77,6 +77,16 @@
- semaphore

tasks:
- name: Install Helm
when: use_helm | bool
ansible.builtin.include_role:
name: andrewrothstein.kubernetes_helm

- name: Install Krew
when: use_krew | bool
ansible.builtin.include_role:
name: andrewrothstein.krew

- name: Install OpenTofu
when: use_opentofu | bool
ansible.builtin.include_role:
Expand Down Expand Up @@ -121,5 +131,5 @@
become: true
gather_facts: true
roles:
- role: nginx
- role: bbaassssiiee.nginx_ssl
tags: [nginx]
11 changes: 8 additions & 3 deletions roles/requirements.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
---
roles:
- src: andrewrothstein.kubernetes_helm
version: 3.0.17
- src: andrewrothstein.krew
version: v1.2.0
- src: andrewrothstein.opentofu
version: 1.0.9
- src: andrewrothstein.powershell
version: v1.2.2
- src: andrewrothstein.terraform
version: v3.0.38
- src: geerlingguy.docker
version: 7.4.3
- src: bbaassssiiee.postgres_ssl
name: postgres
version: 1.1.0
- src: bbaassssiiee.nginx_ssl
name: nginx
version: 1.0.5
- src: bbaassssiiee.proxy
name: proxy
version: 1.0.3