Commit d6b57fe3 authored by nono's avatar nono 💻
Browse files

Mise à jour des fichiers de conf et du README

parent 81263c15
Role Name
shell-lqdn
=========
A brief description of the role goes here.
Ce rôle permet de gérer les utilisateurices et leur configuration sur les serveurs de LQDN.
Requirements
------------
Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.
Aucune dépendances.
Role Variables
--------------
A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.
Le rôle permet d'ajouter des utilisateurices de la façon suivante :
- Supposons un utilisateur **X**.
- Copiez-coller le fichier `tasks/users/user-default.yml` vers `tasks/users/X.yml` et éditez le pour le compléter.
- Éditez le fichier `tasks/main.yml` pour y rajouter un appel du fichier de configuration de l'utilisateur **X**.
- Dans le fichier vault _du playbook_, rajoutez une variable `vault_X_password` qui contient le mot de passe de l'utilisateur. Vous aurez besoin de le générer avec la commande `mkpasswd`.
Dependencies
------------
A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.
N/A
Example Playbook
----------------
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
- hosts: servers
roles:
- { role: username.rolename, x: 42 }
- { role: shell-lqdn, vault_X_password: !vault | XXXXX.. }
License
-------
BSD
AGPLV3
Author Information
------------------
An optional section for the role authors to include contact information, or a website (HTML is not allowed).
np@laquadrature.net
---
# Fichier de configuration pour un·e administrateurice par défault
# N'oubliez pas de rajouter la clé **publique** dans le champ "key".
# Complétez là où se trouve les points "..."
- name: Mise en place de l'admin ...
user:
name: ...
groups:
- lqdn
- sysadmin
- sudo
state: present
skeleton: /etc/skel
shell: /bin/bash
system: no
createhome: yes
home: /home/{{ name }}
- authorized_key:
user: {{ name }}
state: present
key: "..."
......@@ -11,14 +11,11 @@
- sysadmin
- sudo
state: present
skeleton: /etc/skel
skeleton: files/etc/skel
shell: /bin/bash
system: no
createhome: yes
home: /home/nono
# editor: /usr/bin/vim
# git_author_email: np@laquadrature.net
# git_author_name: nono
- name: Ajout sa clé SSH
authorized_key:
......@@ -26,4 +23,4 @@
state: present
key: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAII693UdcBYZro4txl80hOzgZ1WH09cYeAqdRf0Asel59 n07070@rosa-reborn"
comment: "Clé SSH de Nono"
key_options: 'environment="SSHCLIENTUSER=Nono ",environment="SSHCLIENTLOGINNAME=nono"'
key_options: 'environment="SSHCLIENTUSER=Nono ",environment="SSHCLIENTLOGINNAME=nono",environment="EDITOR=/usr/bin/vim",environment="GIT_AUTHOR_EMAIL=np@laquadrature.net",environment="GIT_AUTHOR_NAME=nono"'
......@@ -2,23 +2,25 @@
# Fichier de configuration pour un utilisateur par défault
# N'oubliez pas de rajouter la clé **publique** dans le champ "key".
# Complétez là où se trouve les points "..."
# Tip : ctrl-f "..." username
- name: Mise en place de l'utilisateur ...
user:
name: ...
password: "{{ vault_..._password }}"
groups:
- lqdn
- ...
state: present
skeleton: /etc/skel
skeleton: files/etc/skel
shell: /bin/bash
system: no
createhome: yes
home: /home/...
editor: /usr/bin/vim
git_author_email: ...
git_author_name: ...
- authorized_key:
- name: Ajout sa clé SSH
authorized_key:
user: ...
state: present
keys:
- key: "..."
comment: "..."
key: "..."
comment: "Clé SSH de .."
key_options: 'environment="SSHCLIENTUSER=... ",environment="SSHCLIENTLOGINNAME=...",environment="EDITOR=/usr/bin/vim",environment="GIT_AUTHOR_EMAIL=...",environment="GIT_AUTHOR_NAME=..."'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment