informatique:ansible
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| informatique:ansible [05/10/2023 09:27] – [Docker] cyrille | informatique:ansible [05/10/2023 18:41] (Version actuelle) – [Vagrant] cyrille | ||
|---|---|---|---|
| Ligne 3: | Ligne 3: | ||
| * http:// | * http:// | ||
| * [[https:// | * [[https:// | ||
| + | |||
| + | Installer '' | ||
| + | |||
| + | <code bash> | ||
| + | sudo apt-add-repository ppa: | ||
| + | |||
| + | sudo apt install ansible | ||
| + | Les NOUVEAUX paquets suivants seront installés : | ||
| + | ansible ansible-core python-babel-localedata python3-babel python3-jinja2 python3-jmespath python3-kerberos | ||
| + | python3-ntlm-auth python3-requests-kerberos python3-requests-ntlm python3-resolvelib python3-winrm python3-xmltodict | ||
| + | sshpass | ||
| + | </ | ||
| Définir le user ssh, changer le port : | Définir le user ssh, changer le port : | ||
| Ligne 38: | Ligne 50: | ||
| ===== Docker ===== | ===== Docker ===== | ||
| - | Pratique d' | + | Pratique d' |
| + | |||
| + | Attention, on ne peut pas tout faire car il manque la gestion des services, mais pour des manipulations de fichiers | ||
| Une image docker à partir de Debian pour faire tourner un serveur OpenSSH | Une image docker à partir de Debian pour faire tourner un serveur OpenSSH | ||
| + | * https:// | ||
| + | |||
| + | Aperçu de l' | ||
| < | < | ||
| # | # | ||
| Ligne 57: | Ligne 74: | ||
| LABEL MAINTAINER Cyrille37 | LABEL MAINTAINER Cyrille37 | ||
| - | RUN apt -y update && apt -y install openssh-server | + | RUN apt -y update && apt -y install openssh-server |
| + | && rm -rf / | ||
| + | |||
| + | # set locale to fr_FR to allow french accented characters | ||
| + | RUN localedef -i fr_FR -c -f UTF-8 -A / | ||
| + | ENV LANG fr_FR.utf8 | ||
| + | |||
| + | # create user " | ||
| + | RUN useradd -m -s /bin/bash -G sudo -u 1000 milou | ||
| + | RUN usermod -aG sudo milou | ||
| + | RUN echo ' | ||
| + | RUN echo "milou ALL=(ALL) NOPASSWD: | ||
| # Mandatory to avoid " | # Mandatory to avoid " | ||
| Ligne 66: | Ligne 94: | ||
| CMD ["/ | CMD ["/ | ||
| </ | </ | ||
| + | |||
| + | Pour aller plus loin: | ||
| + | * https:// | ||
| + | * https:// | ||
| + | |||
| + | ===== Vagrant ===== | ||
| + | |||
| + | * [[/ | ||
| + | * https:// | ||
informatique/ansible.1696490847.txt.gz · Dernière modification : de cyrille
