Write data from xorg-detect as local facts for futher usage
This commit is contained in:
parent
e51cfe4447
commit
4d393d924f
17
Manual.org
17
Manual.org
@ -1908,18 +1908,15 @@ first_run: False
|
|||||||
state: directory
|
state: directory
|
||||||
path: /etc/ansible/facts.d
|
path: /etc/ansible/facts.d
|
||||||
|
|
||||||
- name: set xorg and xrandr in xorg_data dictionary
|
- name: write xorg variable as local fact
|
||||||
set_fact:
|
|
||||||
xorg_data: '{{ xorg_data|combine({"xorg": xorg, "xrandr": xrandr}) }}'
|
|
||||||
|
|
||||||
- name: print xorg_data
|
|
||||||
debug:
|
|
||||||
var: xorg_data
|
|
||||||
|
|
||||||
- name: write xorg variable to /etc/yavdr/xorg.yml
|
|
||||||
copy:
|
copy:
|
||||||
content: '{{ xorg_data | to_nice_json }}'
|
content: '{{ {"xorg": xorg} | to_nice_json }}'
|
||||||
dest: /etc/ansible/facts.d/xorg.fact
|
dest: /etc/ansible/facts.d/xorg.fact
|
||||||
|
|
||||||
|
- name: write xrandr variable as local fact
|
||||||
|
copy:
|
||||||
|
content: '{{ {"xrandr": xrandr} | to_nice_json }}'
|
||||||
|
dest: /etc/ansible/facts.d/xrandr.fact
|
||||||
when:
|
when:
|
||||||
- xrandr is defined
|
- xrandr is defined
|
||||||
- xorg is defined
|
- xorg is defined
|
||||||
|
@ -1,2 +1 @@
|
|||||||
first_run: False
|
first_run: False
|
||||||
xorg_data: {}
|
|
||||||
|
@ -106,18 +106,15 @@
|
|||||||
state: directory
|
state: directory
|
||||||
path: /etc/ansible/facts.d
|
path: /etc/ansible/facts.d
|
||||||
|
|
||||||
- name: set xorg and xrandr in xorg_data dictionary
|
- name: write xorg variable as local fact
|
||||||
set_fact:
|
|
||||||
xorg_data: '{{ xorg_data|combine({"xorg": xorg, "xrandr": xrandr}) }}'
|
|
||||||
|
|
||||||
- name: print xorg_data
|
|
||||||
debug:
|
|
||||||
var: xorg_data
|
|
||||||
|
|
||||||
- name: write xorg variable to /etc/yavdr/xorg.yml
|
|
||||||
copy:
|
copy:
|
||||||
content: '{{ xorg_data | to_nice_json }}'
|
content: '{{ {"xorg": xorg} | to_nice_json }}'
|
||||||
dest: /etc/ansible/facts.d/xorg.fact
|
dest: /etc/ansible/facts.d/xorg.fact
|
||||||
|
|
||||||
|
- name: write xrandr variable as local fact
|
||||||
|
copy:
|
||||||
|
content: '{{ {"xrandr": xrandr} | to_nice_json }}'
|
||||||
|
dest: /etc/ansible/facts.d/xrandr.fact
|
||||||
when:
|
when:
|
||||||
- xrandr is defined
|
- xrandr is defined
|
||||||
- xorg is defined
|
- xorg is defined
|
||||||
|
Loading…
Reference in New Issue
Block a user