- name: Create deployer user ssh dir
  file: path="/home/{{ deployer_user.name }}/.ssh"
    state=directory
    owner="{{ deployer_user.name }}"
    mode=600


- name: Copy of root ssh keys
  command: "cp /root/.ssh/authorized_keys /home/{{ deployer_user.name }}/.ssh/authorized_keys"

- name: Ensure devs keys are present
  authorized_key: key="{{ lookup('file', local_dir + '/' + item) }}"
                  manage_dir=yes
                  state=present
                  user=deployer
  with_items: dev_key_files

- name: Ensure DO pubkey is present
  authorized_key: key="{{ lookup('file', 'id_rsa_digital_ocean.pub') }}"
                  manage_dir=yes
                  state=present
                  user=deployer

- name: Create deployer user ssh dir
  file: path="/home/{{ deployer_user.name }}/.ssh"
    state=directory
    owner="{{ deployer_user.name }}"
    mode=744


- name: Copy of root ssh keys
  command: "cp /root/.ssh/authorized_keys /home/{{ deployer_user.name }}/.ssh/authorized_keys"

- name: Ensure devs keys are present
  authorized_key: key="{{ lookup('file', local_dir + '/' + item) }}"
                  manage_dir=yes
                  state=present
                  user=deployer
  with_items: dev_key_files

- name: Ensure DO pubkey is present
  authorized_key: key="{{ lookup('file', 'id_rsa_digital_ocean.pub') }}"
                  manage_dir=yes
                  state=present
                  user=deployer

Set proper permissions to 744
Set proper permissions to 744
