Allow overriding preferred refresh rate, resolution and connection

for xrandr_facts module. You can set own preferences e.g. in a
host_vars/localhost.yml using the variables preferred_refreshrates,
preferred_resolutions and preferred_outputs (see
roles/yavdr-xorg/default/main.yml for default values).
This commit is contained in:
Alexander Grothe 2018-05-10 22:04:45 +02:00
parent d68cbc252a
commit 65dc2b4fd7
4 changed files with 525 additions and 470 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1713,6 +1713,21 @@ b'\xde\xad\xbe\xef'
*** default variables *** default variables
#+BEGIN_SRC yaml :tangle roles/yavdr-xorg/defaults/main.yml :mkdirp yes :padline no #+BEGIN_SRC yaml :tangle roles/yavdr-xorg/defaults/main.yml :mkdirp yes :padline no
first_run: False first_run: False
preferred_outputs:
- HDMI
- DP
- DVI
- VGA
- TV
preferred_resolutions:
- 7680x4320
- 3840x2160
- 1920x1080
- 1280x720
- 720x576
preferred_refreshrates:
- 50
- 60
#+END_SRC #+END_SRC
*** tasks *** tasks
@ -1932,7 +1947,10 @@ first_run: False
timeout: 3 timeout: 3
- name: "detect xorg configuration" - name: "detect xorg configuration"
action: xrandr_facts xrandr_facts:
preferred_refreshrates: '{{ preferred_refreshrates }}'
preferred_resolutions: '{{ preferred_resolutions }}'
preferred_outputs: '{{ preferred_outputs }}'
- debug: - debug:
var: xorg.primary var: xorg.primary

View File

@ -1 +1,16 @@
first_run: False first_run: False
preferred_outputs:
- HDMI
- DP
- DVI
- VGA
- TV
preferred_resolutions:
- 7680x4320
- 3840x2160
- 1920x1080
- 1280x720
- 720x576
preferred_refreshrates:
- 50
- 60

View File

@ -86,7 +86,10 @@
timeout: 3 timeout: 3
- name: "detect xorg configuration" - name: "detect xorg configuration"
action: xrandr_facts xrandr_facts:
preferred_refreshrates: '{{ preferred_refreshrates }}'
preferred_resolutions: '{{ preferred_resolutions }}'
preferred_outputs: '{{ preferred_outputs }}'
- debug: - debug:
var: xorg.primary var: xorg.primary