added roles folder
This commit is contained in:
0
roles/upgrade_os/tasks/main.yml
Normal file
0
roles/upgrade_os/tasks/main.yml
Normal file
0
roles/upgrade_os/tasks/pi_restart.yml
Normal file
0
roles/upgrade_os/tasks/pi_restart.yml
Normal file
16
roles/upgrade_os/tasks/pi_update.yml
Normal file
16
roles/upgrade_os/tasks/pi_update.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
- name: create file to write in
|
||||
become: false
|
||||
command: touch output.txt
|
||||
|
||||
- name: call apt update
|
||||
become: true
|
||||
shell: apt update
|
||||
register: os_info
|
||||
|
||||
- name: write to output.txt
|
||||
copy:
|
||||
content: "{{os_info.stdout_lines}}"
|
||||
dest: output.txt
|
||||
|
||||
- debug:
|
||||
msg: "{{os_info.stdout_lines}}"
|
||||
12
roles/upgrade_os/tasks/pi_upgrade.yml
Normal file
12
roles/upgrade_os/tasks/pi_upgrade.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
- name: call apt update
|
||||
become: true
|
||||
shell: apt update
|
||||
register: os_info
|
||||
|
||||
- name: write to output.txt
|
||||
copy:
|
||||
content: "{{os_info.stdout_lines}}"
|
||||
dest: output.txt
|
||||
|
||||
- debug:
|
||||
msg: "{{os_info.stdout_lines}}"
|
||||
Reference in New Issue
Block a user