Fix indentation, reorder tasks

This commit is contained in:
Alexander Grothe 2018-01-16 15:01:27 +01:00
parent b08f5d842a
commit 08c2154220
2 changed files with 14 additions and 12 deletions

View File

@ -1903,18 +1903,19 @@ xorg_data: {}
- name: save results - name: save results
block: block:
- name: write xorg and xrandr variable to xorg_data dictionary - name: ensure facts.d directory exists
- set_fact: file:
state: directory
path: /etc/ansible/facts.d
- name: set xorg and xrandr in xorg_data dictionary
set_fact:
xorg_data: '{{ xorg_data|combine({item[0]: item[1]}) }}' xorg_data: '{{ xorg_data|combine({item[0]: item[1]}) }}'
with_items: with_items:
- ('xorg', xorg) - ('xorg', xorg)
- ('xrandr', xrandr['Screen 0:']) - ('xrandr', xrandr['Screen 0:'])
- name: write xorg variable to /etc/yavdr/xorg.yml - name: write xorg variable to /etc/yavdr/xorg.yml
block:
- file:
state: directory
path: /etc/ansible/facts.d
- copy: - copy:
content: '{{ xorg_data | to_nice_json }}' content: '{{ xorg_data | to_nice_json }}'
dest: /etc/ansible/facts.d/xorg.fact dest: /etc/ansible/facts.d/xorg.fact

View File

@ -101,18 +101,19 @@
- name: save results - name: save results
block: block:
- name: write xorg and xrandr variable to xorg_data dictionary - name: ensure facts.d directory exists
- set_fact: file:
state: directory
path: /etc/ansible/facts.d
- name: set xorg and xrandr in xorg_data dictionary
set_fact:
xorg_data: '{{ xorg_data|combine({item[0]: item[1]}) }}' xorg_data: '{{ xorg_data|combine({item[0]: item[1]}) }}'
with_items: with_items:
- ('xorg', xorg) - ('xorg', xorg)
- ('xrandr', xrandr['Screen 0:']) - ('xrandr', xrandr['Screen 0:'])
- name: write xorg variable to /etc/yavdr/xorg.yml - name: write xorg variable to /etc/yavdr/xorg.yml
block:
- file:
state: directory
path: /etc/ansible/facts.d
- copy: - copy:
content: '{{ xorg_data | to_nice_json }}' content: '{{ xorg_data | to_nice_json }}'
dest: /etc/ansible/facts.d/xorg.fact dest: /etc/ansible/facts.d/xorg.fact