Skip to content
Snippets Groups Projects
Commit 5591d8dc authored by jurgenhaas's avatar jurgenhaas
Browse files

Remove deprecation warnings from Ansible 2.0.1.0

parent d7032d97
No related branches found
No related tags found
No related merge requests found
......@@ -13,16 +13,16 @@
command: usermod --unlock {{item.split(':').0}}
when: item.split(':').0 in users
and item.split(':').2|int > 499
with_items: passwd.stdout_lines
with_items: '{{ passwd.stdout_lines }}'
- name: "Lock deprecated user accounts"
command: usermod --lock {{item.split(':').0}}
when: item.split(':').0 not in users
and item.split(':').2|int > 499
with_items: passwd.stdout_lines
with_items: '{{ passwd.stdout_lines }}'
- name: "Disable ssh keys for deprecated user accounts"
command: rm {{item.split(':').5}}/.ssh/authorized_keys
when: item.split(':').0 not in users
and item.split(':').2|int > 499
with_items: passwd.stdout_lines
with_items: '{{ passwd.stdout_lines }}'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment