Skip to content
Snippets Groups Projects
Commit 2548720b authored by Elena Grandi's avatar Elena Grandi
Browse files

Remove fuss-client -r, confusing and no longer needed

parent b408d6e5
No related merge requests found
Pipeline #712 failed with stage
in 29 seconds
......@@ -169,7 +169,7 @@ class Client(object):
return key_path
def _get_kerberos_key(self):
if not self.args.purge and (
if not self.args.hostname and (
os.path.isfile('/etc/krb5.keytab') or
os.path.isfile('/root/krb5.keytab')
):
......@@ -440,24 +440,6 @@ class Client(object):
))
self._run(add_to_cluster=False)
def remove(self):
logging.info("Removing the machine")
os.chdir(ansible_data_path)
ansible_options = [
'fuss-client',
'-i', 'localhost,',
'-c', 'local',
'--force-handlers',
]
if self.args.dryrun:
ansible_options.extend(['--check'])
if self.args.purge:
ansible_options.extend(['-e', 'purge=true'])
os.execvp(
os.path.join(ansible_data_path, 'remove.yml'),
ansible_options
)
def standalone(self):
logging.info("Configuring a standalone machine")
os.chdir(ansible_data_path)
......@@ -518,7 +500,7 @@ class Client(object):
),
)
# Main actions: add / remove
# Main actions: add / upgrade / standalone / list groups
parser.set_defaults(func=self.add)
group = parser.add_mutually_exclusive_group()
group.add_argument(
......@@ -545,13 +527,6 @@ class Client(object):
dest='func',
help=_("Configure a standalone machine")
)
group.add_argument(
'-r', '--remove',
action="store_const",
const=self.remove,
dest='func',
help=_("Remove the machine from a Fuss Network")
)
group.add_argument(
'-l', '--listgroups',
action="store_const",
......@@ -606,11 +581,6 @@ class Client(object):
'-k', '--ssh-key',
help=_("path to an ssh key"),
)
parser.add_argument(
'-p', '--purge',
help=_("Completely forget the existing connection."),
action="store_true",
)
parser.add_argument(
'--unofficial',
help=_("Also include contrib and non-free."),
......
#! /usr/bin/env ansible-playbook
# Copyright (C) 2016-2017 Progetto Fuss <info@fuss.bz.it>
# Elena Grandi <elena@truelite.it>,
# Christopher R. Gabriel <cgabriel@truelite.it>
# Copyright (C) 2017-2021 The FUSS Project <info@fuss.bz.it>
# Copyright (C) 2021-2022 The FUSS Project <info@fuss.bz.it>
# Author: Elena Grandi <elena@truelite.it>,
# Christopher R. Gabriel <cgabriel@truelite.it>,
# Marco Marinello <contact-nohuman@marinello.bz.it>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program or from the site that you downloaded it
# from; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
---
- name: Disconnect a Fuss client
hosts: all
tasks:
- name: Do not configure nfs home directories
file:
dest: /etc/systemd/system/home.mount
state: absent
- name: Remove custom firefox-esr configuration
file:
dest: /etc/firefox-esr/firefox-fuss.js
state: absent
- name: Remove custom chromium configuration
file:
dest: /etc/chromium/policies/managed/fuss.json
state: absent
- name: Remove custom chromium .desktop
file:
dest: /usr/local/share/applications/chromium.desktop
state: absent
- name: Remove server.conf
file:
dest: /etc/fuss-client/server.conf
state: absent
- name: Remove the existing kerberos keys
file:
dest: /etc/krb5.keytab
state: absent
when: purge is defined and purge
- name: Remove the existing kerberos keys temp file
file:
dest: /root/krb5.keytab
state: absent
when: purge is defined and purge
- name: Remove known hosts
file:
dest: /root/.ssh/known_hosts
state: absent
when: purge is defined and purge
- name: Remove wget proxy
blockinfile:
state: absent
dest: /etc/wgetrc
marker: "# {mark} ADDED BY FUSS_CLIENT"
backup: yes
- name: Remove env proxy
blockinfile:
state: absent
dest: /etc/environment
marker: "# {mark} ADDED BY FUSS_CLIENT"
backup: yes
- name: Remove apt proxy
blockinfile:
state: absent
dest: /etc/apt/apt.conf
marker: "# {mark} ADDED BY FUSS_CLIENT"
backup: yes
fuss-client (12.0.7) UNRELEASED; urgency=medium
* Remove fuss-client -r, confusing and no longer needed.
* Fix mounting homes after running fuss-client with -H.
-- Elena Grandi <valhalla@debian.org> Fri, 17 Mar 2023 13:54:06 +0100
fuss-client (12.0.6) unstable; urgency=medium
[ Elena Grandi ]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment