Liens vers les bonnes pages
This commit is contained in:
parent
7ae90e076a
commit
6e97db5557
|
@ -112,7 +112,7 @@ Pour avoir la liste des modules utilisables : `ansible-doc -l`
|
|||
|
||||
Voici quelques exemples de modules que nous utilisons :
|
||||
|
||||
* Module [ansible.builtin.command](https://docs.ansible.com/ansible/2.10/modules/command_module.html) :
|
||||
* Module [ansible.builtin.command](https://docs.ansible.com/ansible/2.10/collections/ansible/builtin/command_module.html) :
|
||||
|
||||
~~~{.yaml}
|
||||
- ansible.builtin.command:
|
||||
|
@ -121,7 +121,7 @@ Voici quelques exemples de modules que nous utilisons :
|
|||
|
||||
Ce module ne permet que l'exécution de commandes simple (pas de pipe…) mais en échange il vérifie les commandes et les assainit pour limiter les injections.
|
||||
|
||||
* Module [ansible.builtin.shell](https://docs.ansible.com/ansible/2.10/modules/shell_module.html) :
|
||||
* Module [ansible.builtin.shell](https://docs.ansible.com/ansible/2.10/collections/ansible/builtin/shell_module.html) :
|
||||
|
||||
~~~{.yaml}
|
||||
- ansible.builtin.shell:
|
||||
|
@ -138,7 +138,7 @@ Pour forcr un shell en particulier :
|
|||
executable: /bin/bash
|
||||
~~~
|
||||
|
||||
* Module [ansible.builtin.file](https://docs.ansible.com/ansible/2.10/modules/file_module.html) :
|
||||
* Module [ansible.builtin.file](https://docs.ansible.com/ansible/2.10/collections/ansible/builtin/file_module.html) :
|
||||
|
||||
~~~{.yaml}
|
||||
- ansible.builtin.file:
|
||||
|
@ -146,7 +146,7 @@ Pour forcr un shell en particulier :
|
|||
state: absent
|
||||
~~~
|
||||
|
||||
* Module [ansible.builtin.copy](https://docs.ansible.com/ansible/2.10/modules/copy_module.html) :
|
||||
* Module [ansible.builtin.copy](https://docs.ansible.com/ansible/2.10/collections/ansible/builtin/copy_module.html) :
|
||||
|
||||
~~~{.yaml}
|
||||
- ansible.builtin.copy:
|
||||
|
@ -157,7 +157,7 @@ Pour forcr un shell en particulier :
|
|||
mode: "0644"
|
||||
~~~
|
||||
|
||||
* Module [ansible.builtin.replace](https://docs.ansible.com/ansible/2.10/modules/replace_module.html) :
|
||||
* Module [ansible.builtin.replace](https://docs.ansible.com/ansible/2.10/collections/ansible/builtin/replace_module.html) :
|
||||
|
||||
~~~{.yaml}
|
||||
- ansible.builtin.replace:
|
||||
|
@ -166,7 +166,7 @@ Pour forcr un shell en particulier :
|
|||
replace: '\1,{{ name }}'
|
||||
~~~
|
||||
|
||||
* Module [ansible.builtin.lineinfile](https://docs.ansible.com/ansible/2.10/modules/lineinfile_module.html) :
|
||||
* Module [ansible.builtin.lineinfile](https://docs.ansible.com/ansible/2.10/collections/ansible/builtin/lineinfile_module.html) :
|
||||
|
||||
~~~{.yaml}
|
||||
- ansible.builtin.lineinfile:
|
||||
|
@ -185,7 +185,7 @@ Pour forcr un shell en particulier :
|
|||
* avec _lineinfile_, si l'on veut utiliser une référence (`\1`) dans _line_, ça donne une erreur, il faut utiliser _replace_
|
||||
* avec _lineinfile_, l'argument `backrefs: yes` sert à utiliser une référence au sein de l'argument _regexp_ (et non pas au sein de l'argument _line_).
|
||||
|
||||
* Module [ansible.builtin.blockinfile](https://docs.ansible.com/ansible/2.10/modules/blockinfile_module.html) :
|
||||
* Module [ansible.builtin.blockinfile](https://docs.ansible.com/ansible/2.10/collections/ansible/builtin/blockinfile_module.html) :
|
||||
|
||||
~~~{.yaml}
|
||||
- ansible.builtin.blockinfile:
|
||||
|
@ -195,7 +195,7 @@ Pour forcr un shell en particulier :
|
|||
## Set rights on files and directories written by Apache
|
||||
~~~
|
||||
|
||||
* Module [community.general.ini_file](https://docs.ansible.com/ansible/2.10/modules/ini_file_module.html) :
|
||||
* Module [community.general.ini_file](https://docs.ansible.com/ansible/2.10/collections/community/general/ini_file_module.html) :
|
||||
|
||||
~~~{.yaml}
|
||||
- community.general.ini_file:
|
||||
|
@ -208,7 +208,7 @@ Pour forcr un shell en particulier :
|
|||
|
||||
Ce module permet de facilement d'ajouter/modifier/supprimer des valeurs dans des fichiers INI, dans la bonne section, sans se soucier de la syntaxe.
|
||||
|
||||
* Module [ansible.builtin.user](https://docs.ansible.com/ansible/2.10/modules/user_module.html) :
|
||||
* Module [ansible.builtin.user](https://docs.ansible.com/ansible/2.10/collections/ansible/builtin/user_module.html) :
|
||||
|
||||
~~~{.yaml}
|
||||
- ansible.builtin.user:
|
||||
|
@ -227,7 +227,7 @@ Pour générer le hash du mot de passe à mettre dans la variable `password` :
|
|||
mkpasswd --method=sha-512
|
||||
~~~
|
||||
|
||||
* Module [ansible.builtin.group](https://docs.ansible.com/ansible/2.10/modules/group_module.html) :
|
||||
* Module [ansible.builtin.group](https://docs.ansible.com/ansible/2.10/collections/ansible/builtin/group_module.html) :
|
||||
|
||||
~~~{.yaml}
|
||||
- ansible.builtin.group:
|
||||
|
@ -236,7 +236,7 @@ mkpasswd --method=sha-512
|
|||
gid: "1042"
|
||||
~~~
|
||||
|
||||
* Module [ansible.builtin.stat](https://docs.ansible.com/ansible/2.10/modules/stat_module.html) :
|
||||
* Module [ansible.builtin.stat](https://docs.ansible.com/ansible/2.10/collections/ansible/builtin/stat_module.html) :
|
||||
|
||||
~~~{.yaml}
|
||||
- ansible.builtin.stat:
|
||||
|
@ -244,7 +244,7 @@ mkpasswd --method=sha-512
|
|||
register: foo_sudoers_file
|
||||
~~~
|
||||
|
||||
* Module [ansible.builtin.apt](https://docs.ansible.com/ansible/2.10/modules/apt_module.html) :
|
||||
* Module [ansible.builtin.apt](https://docs.ansible.com/ansible/2.10/collections/ansible/builtin/apt_module.html) :
|
||||
|
||||
~~~{.yaml}
|
||||
- ansible.builtin.apt:
|
||||
|
@ -259,7 +259,7 @@ mkpasswd --method=sha-512
|
|||
|
||||
Ce module fait partie d'une courte liste de modules pour lesquels l'utilisation d'une boucle (avec `with_items` par exemple) ne provoque pas l'exécution séquentielle et répétée du module. Dans l'exemple ci-dessus le module utilisera "apt" intelligemment.
|
||||
|
||||
* Module [ansible.builtin.apt_repository](https://docs.ansible.com/ansible/2.10/modules/apt_repository_module.html) :
|
||||
* Module [ansible.builtin.apt_repository](https://docs.ansible.com/ansible/2.10/collections/ansible/builtin/apt_repository_module.html) :
|
||||
|
||||
~~~{.yaml}
|
||||
- name: exemple
|
||||
|
@ -271,7 +271,7 @@ Ce module fait partie d'une courte liste de modules pour lesquels l'utilisation
|
|||
|
||||
L'indication "filename" permet de référencer le dépôt dans `/etc/apt/sources.list.d/<filename>.list`.
|
||||
|
||||
* Module [community.mysql.mysql_user](https://docs.ansible.com/ansible/2.10/modules/mysql_user_module.html) :
|
||||
* Module [community.mysql.mysql_user](https://docs.ansible.com/ansible/2.10/collections/community/mysql/mysql_user_module.html) :
|
||||
|
||||
~~~{.yaml}
|
||||
- community.mysql.mysql_user:
|
||||
|
@ -285,7 +285,7 @@ L'indication "filename" permet de référencer le dépôt dans `/etc/apt/sources
|
|||
|
||||
Lorsqu'une réplication est en place, on peut choisir de ne pas propager l'action dans les binlogs, avec l'option `sql_log_bin: no`.
|
||||
|
||||
* module [community.mysql.mysql_variables](https://docs.ansible.com/ansible/2.10/modules/mysql_variables_module.html)
|
||||
* module [community.mysql.mysql_variables](https://docs.ansible.com/ansible/2.10/collections/community/mysql/mysql_variables_module.html)
|
||||
|
||||
~~~{.yaml}
|
||||
- community.mysql.mysql_variables:
|
||||
|
@ -295,7 +295,7 @@ Lorsqu'une réplication est en place, on peut choisir de ne pas propager l'actio
|
|||
|
||||
Cela permet d'exécuter une commande du type "SET GLOBAL read_only = 1;" de manière idempotente.
|
||||
|
||||
* module [community.general.htpasswd](https://docs.ansible.com/ansible/2.10/modules/htpasswd_module.html)
|
||||
* module [community.general.htpasswd](https://docs.ansible.com/ansible/2.10/collections/community/general/htpasswd_module.html)
|
||||
|
||||
~~~{.yaml}
|
||||
- community.general.htpasswd:
|
||||
|
@ -309,7 +309,7 @@ Cela permet d'exécuter une commande du type "SET GLOBAL read_only = 1;" de mani
|
|||
|
||||
Il nécessite la bibliothèque Python "passlib", installable sous Debian grace au paquet "python-passlib" ("python3-passlib" sur les versions récentes).
|
||||
|
||||
* Module [ansible.posix.sysctl](https://docs.ansible.com/ansible/2.10/modules/sysctl_module.html) :
|
||||
* Module [ansible.posix.sysctl](https://docs.ansible.com/ansible/2.10/collections/ansible/posix/sysctl_module.html) :
|
||||
|
||||
~~~{.yaml}
|
||||
- name: exemple
|
||||
|
@ -319,7 +319,7 @@ Il nécessite la bibliothèque Python "passlib", installable sous Debian grace a
|
|||
sysctl_file: /etc/sysctl.d/elasticsearch.conf
|
||||
~~~
|
||||
|
||||
* Module [community.general.alternatives](https://docs.ansible.com/ansible/2.10/modules/alternatives_module.html) :
|
||||
* Module [community.general.alternatives](https://docs.ansible.com/ansible/2.10/collections/community/general/alternatives_module.html) :
|
||||
|
||||
~~~{.yaml}
|
||||
- community.general.alternatives:
|
||||
|
@ -327,7 +327,7 @@ Il nécessite la bibliothèque Python "passlib", installable sous Debian grace a
|
|||
path: /usr/bin/vim.basic
|
||||
~~~
|
||||
|
||||
* Module [ansible.builtin.service](https://docs.ansible.com/ansible/2.10/modules/service_module.html) :
|
||||
* Module [ansible.builtin.service](https://docs.ansible.com/ansible/2.10/collections/ansible/builtin/service_module.html) :
|
||||
|
||||
~~~{.yaml}
|
||||
- name: exemple pour redémarrer un service (compatible avec sysvinit, systemd…)
|
||||
|
@ -335,7 +335,7 @@ Il nécessite la bibliothèque Python "passlib", installable sous Debian grace a
|
|||
state: restarted
|
||||
~~~
|
||||
|
||||
* Module [community.general.openbsd_pkg](https://docs.ansible.com/ansible/2.10/modules/openbsd_pkg_module.html) :
|
||||
* Module [community.general.openbsd_pkg](https://docs.ansible.com/ansible/2.10/collections/community/general/openbsd_pkg_module.html) :
|
||||
|
||||
~~~{.yaml}
|
||||
- community.general.openbsd_pkg:
|
||||
|
@ -346,7 +346,7 @@ Il nécessite la bibliothèque Python "passlib", installable sous Debian grace a
|
|||
- vim--no_x11
|
||||
~~~
|
||||
|
||||
* module [community.general.timezone](https://docs.ansible.com/ansible/2.10/modules/timezone_module.html) :
|
||||
* module [community.general.timezone](https://docs.ansible.com/ansible/2.10/collections/community/general/timezone_module.html) :
|
||||
|
||||
~~~{.yaml}
|
||||
- community.general.timezone:
|
||||
|
|
Loading…
Reference in a new issue