Verified Commit 43cb1293 authored by Giancarlo Razzolini's avatar Giancarlo Razzolini
Browse files

common: Add a maintenance_remote_machine variable

Add a variable that takes the SSH_CLIENT environment variable to save the
ip address of the machine actually running the playbooks. This can be used
on maintenance mode to allow in the person running the playbook and let
everybody else to see the maintenance page.
parent 35d176f6
......@@ -6,3 +6,7 @@ ansible_python_interpreter: /usr/bin/python3
- Template OS Linux
# this is used by the maintenance role to get the ip address
# of the machine running the playbook
maintenance_remote_machine: "{{ hostvars[inventory_hostname]['ansible_env'].SSH_CLIENT.split(' ')[0] }}"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment