Advertisement
Guest User

Untitled

a guest
Jul 28th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. ---
  2. #
  3. # /opt/rpc-openstack/rpcd/playbooks/customer_users.yml
  4. #
  5. - name: Create customers users and keys
  6. hosts:
  7. - infra_hosts
  8. - compute_hosts
  9. - log_hosts
  10. - mons_hosts
  11. - osds_hosts
  12. - storage_hosts
  13. - swift_hosts
  14. user: root
  15. tasks:
  16. - name: Make sure we have a "wheel" group
  17. group:
  18. name: wheel
  19. state: present
  20.  
  21. - name: Allow "wheel" group to have passwordless sudo
  22. lineinfile:
  23. dest: /etc/sudoers
  24. state: present
  25. regexp: "^%wheel"
  26. line: "%wheel ALL=(ALL) NOPASSWD: ALL"
  27.  
  28. - name: Add customer users to "wheel" group
  29. user:
  30. name: "{{ item.name }}"
  31. groups: wheel
  32. append: yes
  33. with_items: "{{ customer_users }}"
  34.  
  35. - name: Add customer users keys to authorized_keys
  36. authorized_key:
  37. user: "{{ item.name }}"
  38. key: "{{ item.key }}"
  39. with_items: "{{ customer_users }}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement