[ansible-project] Useful Ansible snippets for Sublime and filter plugins

2016-07-10 Thread Alexander Jäger
Hi there,

i wanted to shared some work i did:

1. I wrote a shell script which writes auto completion snippets for Sublime 
text: https://github.com/lxhunter/ansible-sublime-text-snippets
2. I wrote and documented filter plugins for ansible, I borrowed the 
functions from 
underscore.string: https://github.com/lxhunter/ansible-filter-plugins

If you find them useful, give me a star and fork if you like to advance 
them ;)

Have a nice Sunday!
Alex

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/71f35fe4-2128-4af3-9592-a65871687f86%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Subcollection diff

2014-03-25 Thread Alexander Jäger
Hey all,

i trying to write a idempotent user role, where basically on every run is 
checked if the non-system present_users is right.
Now i want to compare my list of user in vars with the present_users.

Here are my user vars:

### ->

users:
  - username: ajaeger
groups: ['...']
  - username: vagrant
groups: ['...']
  - username: slayer
groups: ['...']

### <-

here is my task:

### ->

- name: Get list of all users
  shell: "awk -F: '$3 >= 1000 && $3 < 2 {print $1}' /etc/passwd"
  register: existing_users

### <-

now i want to: 

### ->

- user: name="{{ item }}" state=absent remove=yes
  with_items: "{{ to_be_installed_users | difference(existing_users) }}"

### <-

Any suggestions, would be greatly appreciated!

Cheers,
Alex

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/db3aa0ba-8eae-49cf-8ffe-ae6dafdb5132%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.