====== Ansible ====== ===== venv ===== ''%%sed -i -e "s/\/opt\/ansible28/\/home\/didier/g" ansible-*%%'' ''%%. venv/bin/activate%%'' ===== qqes commandes ===== ''%%ansible-playbook playbooks/fetch-inventory.yml -i inventories/inventory -vvvvvvv -e 'ansible_python_interpreter=../venv/bin/python'%%'' ===== Commentaires dans inventaire ===== ''%%ansible_host=1.1.4.31 _annotation="commentaire"%%'' ===== Lien ===== [[https://www.tecmint.com/create-and-download-roles-on-ansible-galaxy/]] ===== Fichier ansible.cfg ===== FIXME Attention, j'ai déjà rencontré l'erreur ''The following modules failed to execute: setup'' à cause de la ligne ''interpreter_python = /home/didier/venv/bin/python''.\\ Mais d'un autre côté c'est cette ligne qui m'a aidé à faire fonctionner le Dell OpenManage Module for Ansible... [defaults] ansible_managed = This file is managed by Didier with the Ansible software.%n # deploy-from-template: {file} # deploy-at-date: %Y-%m-%d %H h # deploy-by-user: {uid} # deploy-from-host: {host} host_key_checking = False display_args_to_stdout = true inventory= ./inventories library= ./lib forks= 150 roles_path= ./roles log_path= /home/didier/logs/ansible/ansible-audited.log #local_tmp = /var/log/application/ansible/tmp #retry_files_save_path = /var/log/application/ansible/retry/ nocows= 1 #stdout_callback = dense # dense stdout callback options #show_custom_stats = no #display_skipped_hosts = yes #stdout_callback = debug #stdout_callback = actionable #vault_password_file = ./vaultid # set plugin path directories here, separate with colons #action_plugins = /usr/share/ansible/plugins/action #cache_plugins = /usr/share/ansible/plugins/cache #callback_plugins = /usr/share/ansible/plugins/callback #connection_plugins = /usr/share/ansible/plugins/connection lookup_plugins = ./plugins/lookup inventory_plugins = ./plugins/inventory #vars_plugins = /usr/share/ansible/plugins/vars filter_plugins = ./plugins/filter #test_plugins = /usr/share/ansible/plugins/test #terminal_plugins = /usr/share/ansible/plugins/terminal #strategy_plugins = /usr/share/ansible/plugins/strategy #private_key_file = /root/.ssh/id_rsa_xxx interpreter_python = /home/didier/venv/bin/python [inventory] enable_plugins = script, ini [diff] # Always print diff when running ( same as always running with -D/--diff ) always = yes [colors] verbose= purple {{tag>GNU_Linux Ansible Python}}