first commit

This commit is contained in:
Ryan Cuda
2026-01-25 08:31:56 -07:00
commit 1234ef51c0
57 changed files with 2560 additions and 0 deletions

28
solutions/issue.yml Normal file
View File

@@ -0,0 +1,28 @@
---
- name: Automatically populate /etc/issue with environment name
hosts:
- dev
- test
- prod
become: true
tasks:
- name: Determine environment name from inventory groups
ansible.builtin.set_fact:
env_name: >-
{% if 'prod' in group_names %}
Production
{% elif 'test' in group_names %}
Testing
{% elif 'dev' in group_names %}
Development
{% endif %}
- name: Populate /etc/issue
ansible.builtin.copy:
dest: /etc/issue
content: |
{{ env_name }}
owner: root
group: root
mode: '0644'