subtasks.
This commit is contained in:
@@ -1,11 +1,13 @@
|
|||||||
[defaults]
|
[defaults]
|
||||||
inventory = inventory.yml
|
inventory = inventory.yml
|
||||||
|
library = ./library
|
||||||
interpreter_python = auto_silent
|
interpreter_python = auto_silent
|
||||||
nocows = 1
|
nocows = 1
|
||||||
timeout= 60
|
timeout= 60
|
||||||
force_valid_group_names = ignore
|
force_valid_group_names = ignore
|
||||||
#private_key_file = ~/.ssh/id_ed25519
|
#private_key_file = ~/.ssh/id_ed25519
|
||||||
private_key_file = ~/.ssh/id_rsa
|
private_key_file = ~/.ssh/id_rsa
|
||||||
|
default_module_path = ./library
|
||||||
|
|
||||||
[ssh_connection]
|
[ssh_connection]
|
||||||
ssh_args = -o StrictHostKeyChecking=no
|
ssh_args = -o StrictHostKeyChecking=no
|
||||||
|
@@ -4,11 +4,20 @@ stack4:
|
|||||||
willie:
|
willie:
|
||||||
kirk:
|
kirk:
|
||||||
brandine:
|
brandine:
|
||||||
|
|
||||||
|
test:
|
||||||
|
hosts:
|
||||||
|
hans:
|
||||||
|
cleatus:
|
||||||
terry:
|
terry:
|
||||||
|
|
||||||
webs:
|
webs:
|
||||||
hosts:
|
hosts:
|
||||||
web[00:09]:
|
web[00:09]:
|
||||||
|
|
||||||
|
frinks:
|
||||||
|
hosts:
|
||||||
|
frink[00:05]
|
||||||
|
|
||||||
vars:
|
vars:
|
||||||
ansible_python_interpreter: /usr/bin/python3
|
ansible_python_interpreter: /usr/bin/python
|
||||||
|
7
log2ram-st.yml
Normal file
7
log2ram-st.yml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
- hosts: "{{ target }}"
|
||||||
|
gather_facts: false
|
||||||
|
remote_user: pi
|
||||||
|
roles:
|
||||||
|
- log2ram-st
|
||||||
|
|
@@ -1,3 +1,10 @@
|
|||||||
- name: Informationen sammeln
|
- name: Informationen sammeln
|
||||||
ansible.builtin.debug:
|
ansible.builtin.debug:
|
||||||
var: ansible_facts
|
var: ansible_facts
|
||||||
|
|
||||||
|
- name: leeres File anlegen
|
||||||
|
file:
|
||||||
|
path: /home/pi/testwhen
|
||||||
|
state: touch
|
||||||
|
when: (ansible_facts['hostname'] == 'brandine' or ansible_facts['hostname'] == 'kirk')
|
||||||
|
|
||||||
|
7
roles/log2ram-st/tasks/add_repo_key.yml
Normal file
7
roles/log2ram-st/tasks/add_repo_key.yml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
- name: Key
|
||||||
|
become: true
|
||||||
|
apt_key:
|
||||||
|
url: https://azlux.fr/repo.gpg.key
|
||||||
|
state: present
|
||||||
|
|
9
roles/log2ram-st/tasks/add_repo_source.yml
Normal file
9
roles/log2ram-st/tasks/add_repo_source.yml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
- name: Paketquelle
|
||||||
|
become: true
|
||||||
|
apt_repository:
|
||||||
|
repo: 'deb http://packages.azlux.fr/debian/ bookworm main'
|
||||||
|
state: present
|
||||||
|
filename: log2ram
|
||||||
|
update_cache: yes
|
||||||
|
|
8
roles/log2ram-st/tasks/install_log2ram.yml
Normal file
8
roles/log2ram-st/tasks/install_log2ram.yml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
- name: log2ram installieren
|
||||||
|
become: true
|
||||||
|
apt:
|
||||||
|
update_cache: yes
|
||||||
|
name:
|
||||||
|
- log2ram
|
||||||
|
|
5
roles/log2ram-st/tasks/main.yml
Normal file
5
roles/log2ram-st/tasks/main.yml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
- include: ../subtasks/upgrade.yml
|
||||||
|
- include: add_repo_key.yml
|
||||||
|
- include: add_repo_source.yml
|
||||||
|
- include: install_log2ram.yml
|
||||||
|
- include: ../subtasks/reboot.yml
|
7
roles/log2ram-st/tasks/main.yml.bak
Normal file
7
roles/log2ram-st/tasks/main.yml.bak
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
|
||||||
|
- name: logram Haupttask
|
||||||
|
tasks:
|
||||||
|
- include: add_repo_key.yml
|
||||||
|
- include: add_repo_source.yml
|
||||||
|
- include: install_log2ram.yml
|
||||||
|
|
@@ -1,8 +1,8 @@
|
|||||||
#- name: PI Update
|
- name: PI Update
|
||||||
# become: true
|
become: true
|
||||||
# apt:
|
apt:
|
||||||
# update_cache: yes
|
update_cache: yes
|
||||||
# upgrade: dist
|
upgrade: dist
|
||||||
- name: Key
|
- name: Key
|
||||||
become: true
|
become: true
|
||||||
apt_key:
|
apt_key:
|
||||||
|
5
roles/subtasks/reboot.yml
Normal file
5
roles/subtasks/reboot.yml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
- name: Neustart
|
||||||
|
become: true
|
||||||
|
reboot:
|
||||||
|
|
7
roles/subtasks/upgrade.yml
Normal file
7
roles/subtasks/upgrade.yml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
- name: PI Update
|
||||||
|
become: true
|
||||||
|
apt:
|
||||||
|
update_cache: yes
|
||||||
|
upgrade: dist
|
||||||
|
|
Reference in New Issue
Block a user