Max
Max
я пошел прятаться под одеялко и дрожать.
George
George
Max
https://en.wikipedia.org/wiki/Venn_diagram
George
George
Timur
Max
кстати, диаграммы Венна Ойлера.
George
George
этот флаг продублирован в ансибле, но толку
George
George
откуда это взялось?
George
George
но это часть системы управления хостингом?
Victor
George
George
и не ломать мозг
Артём
Или дописать модуль.
Victor
Victor
Что-то из разряда, kill_processes: yes, действует только при state: absent, киляет процессы пользователя перед его удалением
George
скажем так - пользователей удалять на самом деле не нужно
George
их достаточно блокировать
George
а еще лучше заводить пользователей в каталог.
George
т.е. система будет eventually автоматически когда-нибудь в целевом состоянии
Oleksandr
вжопу каталог
Victor
George
Both the commands adds an exclamation mark (“!”) in the second field of the file /etc/passwd.
George
вот это найс
Victor
лойс
.
.
их достаточно блокировать
я бы поспорил, но не буду. :) в любом случае, наша политика - удалять, блокируют в других случаях.
Viktor
Кто-то делал if прямо в ansible-plabook? делаю {{ 'special_time: "{{ item.special_time }}" ' if {{ item.special_time }} is defined else ' ' }}. Но ругается на отступы. Как правильно делс=ать прямо в плейбуке if?
George
ну, смотри
George
во-первых, надо блокировать, т.к. пользователь может уволиться, а потом восстановиться
George
во-вторых, он может захотеть свои данные назад
George
но это как-то вне скоупа ансибла вообще
.
Артём
Удалять или не удалять - вопрос стописятый.
«На сервере должны быть эти три юзера и их процессы и хомяки, и никаких других юзеров, процессов и хомяков» - достаточно декларативно?
Oleksandr
Oleksandr
пока не зачистят
George
опять же приходим к истории, что ансибл офигенен для бутстрапа, но для поддержания консистентного состояния
George
😊
George
о, я даже ишью притащил https://github.com/ansible/ansible/issues/11324
Victor
Victor
>I'm going to close this w/o marking it as a bug, the directories were not matching, the user module assumed it needed to make a change, but the user was logged in and doing stuff, hence the error. All worked as it should.
/thread
.
George
https://github.com/ansible/ansible/issues/7475
George
и еще
.
телепаются и все
немного не понял
но там есть такая системная проблема, что если мы пользователя именно что удаляем (а не блокируем), а хомедир оставляем, а потом заводим нового пользователя, то он может получить UID удалённого. И все права на его старый хомедир. А это не совсем правильно.
George
Oleksandr
Oleksandr
удаляй хомдир
Oleksandr
меняй ему права на рута при удалении юзера
Oleksandr
не высасывай из пальца проблемы
Oleksandr
переноси в архив
Oleksandr
перед удалением создай таску на проверку хомяка удаляемого юзера обслуживающему персоналу
Oleksandr
да как угодно можно этот делать
.
Victor
С вашими запросами вам в пору писать свой модуль управления пользователями, а не компостить мозги окружающим.
Victor
со state: [ working, vacation, locked, fired, off-hours, whatever]
George
коллеги
George
force:
description:
- This only affects C(state=absent), it forces removal of the user and associated directories on supported platforms.
- The behavior is the same as C(userdel --force), check the man page for C(userdel) on your system for details and support.
- When used with C(generate_ssh_key=yes) this forces an existing key to be overwritten.
type: bool
default: no
George
NAME
userdel - delete a user account and related files
SYNOPSIS
userdel [options] LOGIN
DESCRIPTION
The userdel command modifies the system account files, deleting all entries that refer to the user name LOGIN. The named user must exist.
OPTIONS
The options which apply to the userdel command are:
-f, --force
This option forces the removal of the user account, even if the user is still logged in. It also forces userdel to remove the user's home directory and mail spool, even if
another user uses the same home directory or if the mail spool is not owned by the specified user. If USERGROUPS_ENAB is defined to yes in /etc/login.defs and if a group
exists with the same name as the deleted user, then this group will be removed, even if it is still the primary group of another user.
Note: This option is dangerous and may leave your system in an inconsistent state.
George
что за ...
.
про модуль я уже понял, извините, если у кого-то сложилось впечатление, что я "компостирую мозги".
George
два момента