Created
June 1, 2018 14:55
-
-
Save evrardjp/85dac86fbcfe19ab8af4ef42d172e6de to your computer and use it in GitHub Desktop.
Testing delegation and stuff
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[all] | |
machine1 ansible_connection=local | |
machine2 ansible_host=127.0.1.1 ansible_python_interpreter=/opt/ansible-runtime/bin/python | |
#localhost ansible_connection=local |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uncommenting localhost changes the behavior of debug task.
To install from within a venv, many things need to be symlink of python-apt.