- hosts: localhost
  tasks:

  - name: Create .bash_aliases file
    file: path=/home/{{ ansible_env.USER }}/.bash_aliases state=touch owner={{ ansible_env.USER }} group={{ ansible_env.USER }} mode=0644

  - name: Add aliases to bashrc file
    lineinfile: dest=/home/{{ ansible_env.USER }}/.bash_aliases regexp="{{ item }}" line="{{ item }}" state=present
    with_items:
      - alias gosh="cd ~/work/home/shell"

  - name: Create config dir
    file:
      path: ~/.config
      state: directory
      force: no

  - name: Install Apt Packages
    become: yes
    apt:
      state: present
      name:
        - docker.io
        - jq
        - git
        - openjdk-11-jre
        - alsa-utils
        - ffmpeg
        - imagemagick
        - libimage-exiftool-perl
        - wakeonlan

  - name: Copy lsetup files
    copy:
      src: ./lsetup.sh
      dest: /home/{{ ansible_env.USER }}/lsetup.sh
      owner: "{{ ansible_env.USER }}"
      group: "{{ ansible_env.USER }}"
      mode: '0775'
      force: no
    tags:
      - personal
      - never

  - name: Copy lsetup files
    copy:
      src: ./lsetup.cfg
      dest: /home/{{ ansible_env.USER }}/lsetup.cfg
      owner: "{{ ansible_env.USER }}"
      group: "{{ ansible_env.USER }}"
      mode: '0665'
      force: no
    tags:
      - personal
      - never

  - name: Copy lsetup files
    copy:
      src: ./mateterm.lsetup.conf
      dest: /home/{{ ansible_env.USER }}/mateterm.lsetup.conf
      owner: "{{ ansible_env.USER }}"
      group: "{{ ansible_env.USER }}"
      mode: '0665'
      force: no
    tags:
      - personal
      - never

  - name: Copy lsetup files
    copy:
      src: ./mlan.lsetup.sh
      dest: /home/{{ ansible_env.USER }}/mlan.lsetup.sh
      owner: "{{ ansible_env.USER }}"
      group: "{{ ansible_env.USER }}"
      mode: '0775'
      force: no
    tags:
      - personal
      - never

  - name: Copy lsetup files
    copy:
      src: ./mounts.lsetup.conf
      dest: /home/{{ ansible_env.USER }}/mounts.lsetup.conf
      owner: "{{ ansible_env.USER }}"
      group: "{{ ansible_env.USER }}"
      mode: '0665'
      force: no
    tags:
      - personal
      - never

  

  

