fix bare variables is deprecated warning

parent 0a993c8d
......@@ -59,7 +59,7 @@
install_recommends: yes
state: present
update_cache: yes
with_items: common_debian_pkgs
with_items: "{{ common_debian_pkgs }}"
when: ansible_distribution in common_debian_variants
- name: Install role-independent useful system packages
......@@ -67,7 +67,7 @@
name: "{{ item }}"
state: present
update_cache: yes
with_items: common_redhat_pkgs
with_items: "{{ common_redhat_pkgs }}"
when: ansible_distribution in common_redhat_variants
......@@ -78,7 +78,7 @@
owner: "{{ item.owner | default('root') }}"
group: "{{ item.group | default('root') }}"
mode: 0755
with_items: common_directories
with_items: "{{ common_directories }}"
- name: upload sudo config for key forwarding as root
copy:
......@@ -94,7 +94,7 @@
name: "{{ item }}"
state: present
extra_args: "-i {{ COMMON_PYPI_MIRROR_URL }}"
with_items: common_pip_pkgs
with_items: "{{ common_pip_pkgs }}"
when: ansible_distribution in common_debian_variants
......
......@@ -27,6 +27,5 @@
install_recommends: yes
state: present
update_cache: yes
with_items: server_utils_debian_pkgs
when:
- ansible_distribution == 'Ubuntu'
with_items: "{{ server_utils_debian_pkgs }}"
when: ansible_distribution == 'Ubuntu'
......@@ -104,21 +104,21 @@
shell: /bin/bash
remove: yes
state: "{{ item.state | default('present') }}"
with_items: user_info
with_items: "{{ user_info }}"
- name: assign admin role to admin users
user:
name: "{{ item.name }}"
groups: edxadmin
when: item.type is defined and item.type == 'admin' and item.get('state', 'present') == 'present'
with_items: user_info
with_items: "{{ user_info }}"
- name: get github key(s) and update the authorized_keys file
authorized_key:
user: "{{ item.name }}"
key: "https://github.com/{{ item.name }}.keys"
when: item.github is defined and item.get('state', 'present') == 'present'
with_items: user_info
with_items: "{{ user_info }}"
- name: create bashrc file for normal users
template:
......@@ -127,7 +127,7 @@
mode: 0640
owner: "{{ item.name }}"
when: not (item.type is defined and item.type == 'restricted') and item.get('state', 'present') == 'present'
with_items: user_info
with_items: "{{ user_info }}"
- name: create .profile for all users
template:
......@@ -136,7 +136,7 @@
mode: 0640
owner: "{{ item.name }}"
when: item.get('state', 'present') == 'present'
with_items: user_info
with_items: "{{ user_info }}"
########################################################
# All tasks below this line are for restricted users
......@@ -146,7 +146,7 @@
name: "{{ item.name }}"
shell: /bin/rbash
when: item.type is defined and item.type == 'restricted' and item.get('state', 'present') == 'present'
with_items: user_info
with_items: "{{ user_info }}"
- name: create bashrc file for restricted users
template:
......@@ -155,7 +155,7 @@
mode: 0640
owner: "{{ item.name }}"
when: item.type is defined and item.type == 'restricted' and item.get('state', 'present') == 'present'
with_items: user_info
with_items: "{{ user_info }}"
- name: create sudoers file from template
template:
......@@ -172,7 +172,7 @@
- name: change home directory ownership to root for restricted users
shell: "chown -R root:{{ item.name }} /home/{{ item.name }}"
when: item.type is defined and item.type == 'restricted' and item.get('state', 'present') == 'present'
with_items: user_info
with_items: "{{ user_info }}"
- name: create ~/bin directory
file:
......@@ -182,7 +182,7 @@
owner: root
group: "{{ item.name }}"
when: item.type is defined and item.type == 'restricted' and item.get('state', 'present') == 'present'
with_items: user_info
with_items: "{{ user_info }}"
- name: create allowed command links
file:
......@@ -191,5 +191,5 @@
state: link
when: item[0].type is defined and item[0].type == 'restricted' and item[0].get('state', 'present') == 'present'
with_nested:
- user_info
- user_rbash_links
- "{{ user_info }}"
- "{{ user_rbash_links }}"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment