Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---
- #
- # /opt/rpc-openstack/rpcd/playbooks/customer_users.yml
- #
- - name: Create customers users and keys
- hosts:
- - infra_hosts
- - compute_hosts
- - log_hosts
- - mons_hosts
- - osds_hosts
- - storage_hosts
- - swift_hosts
- user: root
- tasks:
- - name: Make sure we have a "wheel" group
- group:
- name: wheel
- state: present
- - name: Allow "wheel" group to have passwordless sudo
- lineinfile:
- dest: /etc/sudoers
- state: present
- regexp: "^%wheel"
- line: "%wheel ALL=(ALL) NOPASSWD: ALL"
- - name: Add customer users to "wheel" group
- user:
- name: "{{ item.name }}"
- groups: wheel
- append: yes
- with_items: "{{ customer_users }}"
- - name: Add customer users keys to authorized_keys
- authorized_key:
- user: "{{ item.name }}"
- key: "{{ item.key }}"
- with_items: "{{ customer_users }}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement