Improve Compatibility with Python3
replace .iteritems() with .items | list in jinja2 Templates
This commit is contained in:
parent
b816a03d69
commit
76ace23b5e
@ -1482,7 +1482,7 @@ description of the config file format.
|
|||||||
:END:
|
:END:
|
||||||
#+BEGIN_SRC conf :tangle roles/nfs-server/templates/nfs-exports.j2 :mkdirp yes :padline no
|
#+BEGIN_SRC conf :tangle roles/nfs-server/templates/nfs-exports.j2 :mkdirp yes :padline no
|
||||||
/srv *(rw,fsid=0,sync,no_subtree_check,all_squash,anongid={{ vdr.gid }},anonuid={{ vdr.uid }})
|
/srv *(rw,fsid=0,sync,no_subtree_check,all_squash,anongid={{ vdr.gid }},anonuid={{ vdr.uid }})
|
||||||
{% for name, path in media_dirs.iteritems() %}
|
{% for name, path in media_dirs.items() | list %}
|
||||||
{{ path }} *(rw,fsid={{ loop.index }},sync,no_subtree_check,all_squash,anongid={{ vdr.gid }},anonuid={{ vdr.uid }}{{ ',insecure' if nfs.insecure else '' }})
|
{{ path }} *(rw,fsid={{ loop.index }},sync,no_subtree_check,all_squash,anongid={{ vdr.gid }},anonuid={{ vdr.uid }}{{ ',insecure' if nfs.insecure else '' }})
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
@ -5332,7 +5332,7 @@ end
|
|||||||
:ID: 19a7e6f8-5795-45ff-983e-9da37e7dce26
|
:ID: 19a7e6f8-5795-45ff-983e-9da37e7dce26
|
||||||
:END:
|
:END:
|
||||||
#+BEGIN_SRC yaml :tangle roles/samba-config/templates/smb.conf.j2 :mkdirp yes
|
#+BEGIN_SRC yaml :tangle roles/samba-config/templates/smb.conf.j2 :mkdirp yes
|
||||||
{% for name, path in media_dirs.iteritems() %}
|
{% for name, path in media_dirs.items() | list %}
|
||||||
[{{ name }}]
|
[{{ name }}]
|
||||||
path = {{ path }}
|
path = {{ path }}
|
||||||
comment = {{ name }} on %h
|
comment = {{ name }} on %h
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/srv *(rw,fsid=0,sync,no_subtree_check,all_squash,anongid={{ vdr.gid }},anonuid={{ vdr.uid }})
|
/srv *(rw,fsid=0,sync,no_subtree_check,all_squash,anongid={{ vdr.gid }},anonuid={{ vdr.uid }})
|
||||||
{% for name, path in media_dirs.iteritems() %}
|
{% for name, path in media_dirs.items() | list %}
|
||||||
{{ path }} *(rw,fsid={{ loop.index }},sync,no_subtree_check,all_squash,anongid={{ vdr.gid }},anonuid={{ vdr.uid }}{{ ',insecure' if nfs.insecure else '' }})
|
{{ path }} *(rw,fsid={{ loop.index }},sync,no_subtree_check,all_squash,anongid={{ vdr.gid }},anonuid={{ vdr.uid }}{{ ',insecure' if nfs.insecure else '' }})
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -78,7 +78,7 @@
|
|||||||
follow symlinks= yes
|
follow symlinks= yes
|
||||||
wide links= yes
|
wide links= yes
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% for name, path in media_dirs.iteritems() %}
|
{% for name, path in media_dirs.items() | list %}
|
||||||
[{{ name }}]
|
[{{ name }}]
|
||||||
path = {{ path }}
|
path = {{ path }}
|
||||||
comment = {{ name }} on %h
|
comment = {{ name }} on %h
|
||||||
|
@ -90,7 +90,7 @@ Section "Monitor"
|
|||||||
EndSection
|
EndSection
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% for connector, data in xrandr["Screen 0:"].iteritems() %}
|
{% for connector, data in xrandr["Screen 0:"].items() | list %}
|
||||||
{% if not data.is_connected or connector != xorg.primary.connector or (xorg.secondary is defined and connector != xorg.secondary.connector) %}
|
{% if not data.is_connected or connector != xorg.primary.connector or (xorg.secondary is defined and connector != xorg.secondary.connector) %}
|
||||||
Section "Monitor"
|
Section "Monitor"
|
||||||
Identifier "{{ connector|replace("-","") }}"
|
Identifier "{{ connector|replace("-","") }}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user