Unreal amounts of linter fixes
Some checks failed
Ansible Linting / ansible-lint (push) Failing after 4s
Secops Linting and Safety Checks / checkov-scan-s3 (push) Failing after 16s

This commit is contained in:
2025-05-26 01:10:00 -07:00
parent 8ef606153f
commit 75b7f2fa3d
15 changed files with 39 additions and 122 deletions

View File

@@ -1,3 +1,3 @@
nigel:
hosts:
nigel.local:
nigel.local:

View File

@@ -1,4 +1,4 @@
---
skip_list:
- role-name
- var-naming[no-role-prefix]
- var-naming[no-role-prefix]

View File

@@ -2,14 +2,15 @@
# The rest of the role stuff is meant to be ran as the admin user that
# this playbook creates for us
---
- hosts: nigel.local
- name: Setup local admin user with a fresh ubuntu host
hosts: nigel.local
remote_user: nigel
vars:
admin:
username: nigel
tasks:
- name: Copy the nigel admin key
ansible.builtin.authorized_key:
ansible.posix.authorized_key:
user: "{{ admin.username }}"
state: present
key: "{{ lookup('file', '~/.ssh/nigel/admin.pub') }}"
@@ -24,4 +25,4 @@
become: true
ansible.builtin.service:
name: ssh
state: restarted
state: restarted

View File

@@ -1,5 +1,6 @@
---
- hosts: nigel.local
- name: Setup bare metal requirements for nomad
hosts: nigel.local
remote_user: nigel
tasks:
- name: Setup basic role on nigel

View File

@@ -1,7 +1,8 @@
---
- hosts: nigel.local
- name: Setup host as a reverse proxy
hosts: nigel.local
remote_user: nigel
tasks:
- name: Apply reverse proxy role
ansible.builtin.include_role:
name: proxy
name: proxy

View File

@@ -22,4 +22,4 @@
apply:
become: true
tags:
- nomad
- nomad

View File

@@ -10,25 +10,26 @@
keypath: /usr/share/keyrings/hashicorp-archive-keyring.gpg
gpgpath: /tmp/hashicorp.gpg
block:
- name: Download the hashicorp GPG Key
ansible.builtin.get_url:
url: https://apt.releases.hashicorp.com/gpg
dest: "{{ gpgpath }}"
- name: Dearmor the hashicorp gpg key
ansible.builtin.command:
cmd: "gpg --dearmor --yes -o {{ keypath }} {{ gpgpath }}"
register: gpg
changed_when: gpg.rc == 0
- name: Add the hashicorp linux repo
vars:
keyfile: "{{ keypath }}"
ansible.builtin.template:
src: hashicorp.list
dest: /etc/apt/sources.list.d/hashicorp.list
mode: "0644"
- name: Update apt repo cache
ansible.builtin.apt:
update_cache: true
- name: Download the hashicorp GPG Key
ansible.builtin.get_url:
url: https://apt.releases.hashicorp.com/gpg
dest: "{{ gpgpath }}"
mode: "0755"
- name: Dearmor the hashicorp gpg key
ansible.builtin.command:
cmd: "gpg --dearmor --yes -o {{ keypath }} {{ gpgpath }}"
register: gpg
changed_when: gpg.rc == 0
- name: Add the hashicorp linux repo
vars:
keyfile: "{{ keypath }}"
ansible.builtin.template:
src: hashicorp.list
dest: /etc/apt/sources.list.d/hashicorp.list
mode: "0644"
- name: Update apt repo cache
ansible.builtin.apt:
update_cache: true
- name: Install consul
ansible.builtin.apt:
name: consul
@@ -36,7 +37,7 @@
ansible.builtin.apt:
pkg: nomad
- name: Copy in the consul configuration
vars:
vars:
ip: "{{ ansible_default_ipv4['address'] }}"
ansible.builtin.template:
src: consul.hcl
@@ -51,4 +52,4 @@
ansible.builtin.systemd_service:
name: consul
state: stopped
enabled: true
enabled: true

View File

@@ -1 +0,0 @@
host_vol_root: /opt/volumes

View File

@@ -2,7 +2,9 @@
ansible.builtin.file:
path: "{{ nomad.volumes.root }}"
state: directory
mode: "0755"
- name: Ensure registry volume is present
ansible.builtin.file:
path: "{{ nomad.volumes.registry }}"
state: directory
state: directory
mode: "0755"

View File

@@ -1,3 +1,3 @@
proxy_nginx_configs:
- nomad.conf
- ncr.conf
- ncr.conf