mirror of
https://git.fsfe.org/fsfe-system-hackers/innernet-playbook.git
synced 2024-11-24 15:43:19 +01:00
39 lines
1.0 KiB
YAML
39 lines
1.0 KiB
YAML
# SPDX-FileCopyrightText: 2021 Free Software Foundation Europe <https://fsfe.org>
|
|
#
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
---
|
|
- hosts: innernet_server, innernet_client
|
|
remote_user: root
|
|
tasks:
|
|
- pause:
|
|
prompt: "You are using a function to UNINSTALL innernet on the chosen hosts {{ play_hosts }}. Continue? (yes/no)?"
|
|
tags: [never, uninstall]
|
|
register: uninstall_confirm
|
|
delegate_to: localhost
|
|
run_once: yes
|
|
|
|
- fail:
|
|
msg: Aborted uninstallation of innernet.
|
|
tags: [never, uninstall]
|
|
when: not uninstall_confirm.user_input | bool
|
|
delegate_to: localhost
|
|
run_once: yes
|
|
|
|
- name: Get innernet-server hostname from inventory groups
|
|
set_fact:
|
|
# Assuming that we only have one innernet server, we take the first
|
|
# occurence
|
|
innernet_server: "{{ groups['innernet_server'][0] }}"
|
|
run_once: true
|
|
|
|
- hosts: innernet_server
|
|
remote_user: root
|
|
roles:
|
|
- server
|
|
|
|
- hosts: innernet_client
|
|
remote_user: root
|
|
roles:
|
|
- client
|