Page MenuHomeDevCentral

D1355.diff
No OneTemporary

D1355.diff

diff --git a/_modules/node.py b/_modules/node.py
--- a/_modules/node.py
+++ b/_modules/node.py
@@ -135,7 +135,7 @@
dictionary = __pillar__.get(pillar_key, {})
filtered_list = []
- for role, items in dictionary.iteritems():
+ for role, items in dictionary.items():
if role in roles:
filtered_list.extend(items)
diff --git a/roles/bastion/yubico/authorized_yubikeys.sls b/roles/bastion/yubico/authorized_yubikeys.sls
--- a/roles/bastion/yubico/authorized_yubikeys.sls
+++ b/roles/bastion/yubico/authorized_yubikeys.sls
@@ -6,7 +6,7 @@
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
-{% for username, user in salt['forest.get_users']().iteritems() %}
+{% for username, user in salt['forest.get_users']().items() %}
{% if 'yubico_keys' in user %}
/home/{{ username }}/.yubico:
diff --git a/roles/core/users/init.sls b/roles/core/users/init.sls
--- a/roles/core/users/init.sls
+++ b/roles/core/users/init.sls
@@ -34,7 +34,7 @@
# Active accounts
# -------------------------------------------------------------
-{% for username, user in salt['forest.get_users']().iteritems() %}
+{% for username, user in salt['forest.get_users']().items() %}
{{ username }}:
user.present:
- fullname: {{ user['fullname'] }}
@@ -46,7 +46,7 @@
# Groups
# -------------------------------------------------------------
-{% for groupname, group in salt['forest.get_groups']().iteritems() %}
+{% for groupname, group in salt['forest.get_groups']().items() %}
group_{{ groupname }}:
group.present:
- name: {{ groupname }}
@@ -58,7 +58,7 @@
# SSH keys
# -------------------------------------------------------------
-{% for username, user in salt['forest.get_users']().iteritems() %}
+{% for username, user in salt['forest.get_users']().items() %}
/home/{{ username }}/.ssh:
file.directory:
diff --git a/roles/devserver/webserver-wwwroot51/init.sls b/roles/devserver/webserver-wwwroot51/init.sls
--- a/roles/devserver/webserver-wwwroot51/init.sls
+++ b/roles/devserver/webserver-wwwroot51/init.sls
@@ -20,7 +20,7 @@
# 51 sites
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-{% for sitename, site in pillar['wwwroot51_directories'].iteritems() %}
+{% for sitename, site in pillar['wwwroot51_directories'].items() %}
{{ basedir }}/{{ sitename }}:
file.directory:
- dir_mode: 711
diff --git a/roles/viperserv/account/init.sls b/roles/viperserv/account/init.sls
--- a/roles/viperserv/account/init.sls
+++ b/roles/viperserv/account/init.sls
@@ -13,7 +13,7 @@
# Service accounts
# -------------------------------------------------------------
-{% for username, user in pillar['viperserv_accounts'].iteritems() %}
+{% for username, user in pillar['viperserv_accounts'].items() %}
viperserv_account_{{ username }}:
user.present:
@@ -43,5 +43,5 @@
- source: salt://roles/viperserv/account/files/viperserv.sudoers
- template: jinja
- context:
- accounts: {{ pillar['viperserv_accounts'].keys() }}
- bots: {{ pillar['viperserv_bots'].keys() }}
+ accounts: {{ pillar['viperserv_accounts'] }}
+ bots: {{ pillar['viperserv_bots'] }}
diff --git a/roles/viperserv/eggdrop/config.sls b/roles/viperserv/eggdrop/config.sls
--- a/roles/viperserv/eggdrop/config.sls
+++ b/roles/viperserv/eggdrop/config.sls
@@ -13,7 +13,7 @@
# and specific configuration file.
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-{% for botname, bot in pillar['viperserv_bots'].iteritems() %}
+{% for botname, bot in pillar['viperserv_bots'].items() %}
/srv/viperserv/{{ botname }}:
file.directory:
@@ -27,7 +27,7 @@
# Logs
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-{% for botname, bot in pillar['viperserv_bots'].iteritems() %}
+{% for botname, bot in pillar['viperserv_bots'].items() %}
/srv/viperserv/logs/{{ botname }}.log:
file.managed:
@@ -54,7 +54,7 @@
- replace: False
- mode: 660
-{% for botname, bot in pillar['viperserv_bots'].iteritems() %}
+{% for botname, bot in pillar['viperserv_bots'].items() %}
/srv/viperserv/{{ botname }}/eggdrop.conf:
file.managed:
diff --git a/roles/viperserv/eggdrop/service.sls b/roles/viperserv/eggdrop/service.sls
--- a/roles/viperserv/eggdrop/service.sls
+++ b/roles/viperserv/eggdrop/service.sls
@@ -35,7 +35,7 @@
- context:
bots: {{ bots }}
-{% for botname, bot in pillar['viperserv_bots'].iteritems() %}
+{% for botname, bot in pillar['viperserv_bots'].items() %}
/etc/rc.conf.d/eggdrop/{{ botname }}:
file.managed:
- source: salt://roles/viperserv/eggdrop/files/rc/per_instance
diff --git a/roles/webserver-legacy/php-sites/account.sls b/roles/webserver-legacy/php-sites/account.sls
--- a/roles/webserver-legacy/php-sites/account.sls
+++ b/roles/webserver-legacy/php-sites/account.sls
@@ -9,7 +9,7 @@
# Sites user accounts
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-{% for domain, site in pillar['web_php_sites'].iteritems() %}
+{% for domain, site in pillar['web_php_sites'].items() %}
web_account_{{ site['user'] }}:
user.present:
diff --git a/roles/webserver-legacy/php-sites/files.sls b/roles/webserver-legacy/php-sites/files.sls
--- a/roles/webserver-legacy/php-sites/files.sls
+++ b/roles/webserver-legacy/php-sites/files.sls
@@ -9,7 +9,7 @@
# Sites content
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-{% for domain, site in pillar['web_php_sites'].iteritems() %}
+{% for domain, site in pillar['web_php_sites'].items() %}
{% if 'target' in site %}
diff --git a/roles/webserver-legacy/php-sites/files/php-fpm-pool.conf b/roles/webserver-legacy/php-sites/files/php-fpm-pool.conf
--- a/roles/webserver-legacy/php-sites/files/php-fpm-pool.conf
+++ b/roles/webserver-legacy/php-sites/files/php-fpm-pool.conf
@@ -33,6 +33,6 @@
php_flag[display_startup_errors] = {{ display_errors }}
php_admin_flag[log_errors] = on
-{%- for key, value in env.iteritems() %}
+{%- for key, value in env.items() %}
env["{{ key }}"] = {{ value }}
{% endfor -%}
diff --git a/roles/webserver-legacy/php-sites/php-fpm.sls b/roles/webserver-legacy/php-sites/php-fpm.sls
--- a/roles/webserver-legacy/php-sites/php-fpm.sls
+++ b/roles/webserver-legacy/php-sites/php-fpm.sls
@@ -11,7 +11,7 @@
# Configuration : instances
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-{% for instance, config in pillar['php_fpm_instances'].iteritems() %}
+{% for instance, config in pillar['php_fpm_instances'].items() %}
php-fpm_config_{{ instance }}:
file.managed:
@@ -30,7 +30,7 @@
# Configuration : pools
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-{% for fqdn, site in pillar['web_php_sites'].iteritems() %}
+{% for fqdn, site in pillar['web_php_sites'].items() %}
php-fpm_pool_{{ site['user'] }}:
file.managed:
@@ -78,7 +78,7 @@
- context:
instances: {{ instances }}
-{% for instance, config in pillar['php_fpm_instances'].iteritems() %}
+{% for instance, config in pillar['php_fpm_instances'].items() %}
/etc/rc.conf.d/php_fpm/{{ instance }}:
file.managed:
- source: salt://roles/webserver-legacy/php-sites/files/rc/per_instance

File Metadata

Mime Type
text/plain
Expires
Mon, Jan 27, 09:03 (2 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2378514
Default Alt Text
D1355.diff (7 KB)

Event Timeline