Skip to content

Instantly share code, notes, and snippets.

@evrardjp
Created June 1, 2018 14:55
Show Gist options
  • Save evrardjp/85dac86fbcfe19ab8af4ef42d172e6de to your computer and use it in GitHub Desktop.
Save evrardjp/85dac86fbcfe19ab8af4ef42d172e6de to your computer and use it in GitHub Desktop.
Testing delegation and stuff
[all]
machine1 ansible_connection=local
machine2 ansible_host=127.0.1.1 ansible_python_interpreter=/opt/ansible-runtime/bin/python
#localhost ansible_connection=local
---
- hosts: all
tasks:
- debug:
var: ansible_python_interpreter
delegate_to: localhost # Will only be set on localhost
- debug:
var: machin
- name: instlal sl
package:
name: sl
state: present
become: yes
become_method: sudo
@evrardjp
Copy link
Author

evrardjp commented Jun 1, 2018

Uncommenting localhost changes the behavior of debug task.

To install from within a venv, many things need to be symlink of python-apt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment