3 Commits
Author SHA1 Message Date
olli 9621d1d1d4 Konfiguration in .json 2025-07-14 12:21:48 +02:00
olli f29c397220 Versuche mit env. 2025-07-07 18:27:26 +02:00
olli 43ecd71b48 - include durch -include_tasks: ersetzt. 2024-03-17 16:22:32 +01:00
8 changed files with 53 additions and 5 deletions
+6
View File
@@ -0,0 +1,6 @@
- hosts: "{{ target }}"
gather_facts: false
remote_user: pi
roles:
- env
+14
View File
@@ -0,0 +1,14 @@
- name: Setze stage von Umgebungsvariablen
set_fact:
stage: "{{ lookup('env', 'stage') }}"
user: "{{ lookup('env', 'user') }}"
- name: Zeige stage aus ENV und aus Ansible-Variablen
debug:
msg:
- "ENV: {{ lookup('env', 'stage') }}"
- "ENV: {{ lookup('env', 'user') }}"
- "VAR: {{ stage | default('Nicht gesetzt') }}"
- "VAR: {{ user | default('Nicht gesetzt') }}"
+9 -5
View File
@@ -1,5 +1,9 @@
- include: ../subtasks/upgrade.yml
- include: add_repo_key.yml
- include: add_repo_source.yml
- include: install_log2ram.yml
- include: ../subtasks/reboot.yml
---
- include_tasks: "../subtasks/upgrade.yml"
- include_tasks: ../subtasks/upgrade.yml
- include_tasks: add_repo_key.yml
- include_tasks: add_repo_source.yml
- include_tasks: install_log2ram.yml
- include_tasks: ../subtasks/reboot.yml
+5
View File
@@ -0,0 +1,5 @@
stage='develop'
user='dev_user'
+4
View File
@@ -0,0 +1,4 @@
{
"stage": "develop",
"user": "dev_user"
}
+5
View File
@@ -0,0 +1,5 @@
stage='production'
user='prod_user'
+4
View File
@@ -0,0 +1,4 @@
{
"stage": "production",
"user": "prod_user"
}
Executable
+6
View File
@@ -0,0 +1,6 @@
set -a
source ${1}
set +a
ansible-playbook -e="target=localhost" env.yml