blob: 9e24d224ab0a156a90af878bd2287dd9fe4cdc1c [file] [log] [blame]
---
# tasks file for apigee-opdk-setup-apigee-user
- name: Create the apigee group using sudo
group:
name: "{{ opdk_group_name }}"
state: present
when: pbrun_method is not defined
- name: Create the apigee group using pbrun
become: no
shell: "pbrun groupadd {{ opdk_group_name }}"
when: pbrun_method is defined and ( pbrun_method | bool )
- name: Create the apigee user using pbrun
shell: "pbrun useradd -g {{ opdk_group_name }} -c 'OPDK user' {{ opdk_user_name }}"
when: pbrun_method is defined and ( pbrun_method | bool )
- name: Create the apigee user using sudo
user:
name: "{{ opdk_user_name }}"
comment: "OPDK user"
group: "{{ opdk_group_name }}"
generate_ssh_key: yes
ssh_key_bits: 2048
ssh_key_file: .ssh/id_rsa
when: pbrun_method is not defined
- name: Ensure that OPDK staging folder is in place
file:
path: '{{ opdk_installer_path }}'
state: directory
group: '{{ opdk_group_name }}'
owner: '{{ opdk_user_name }}'
recurse: yes
mode: 0755
- name: Installation home stats
stat:
path: '{{ apigee_installation_home }}'
- name: Setup permission for apigee installation home directory
file:
path: '{{ apigee_installation_home }}'
group: '{{ opdk_group_name }}'
owner: '{{ opdk_user_name }}'
mode: 0755
state: directory