| | |
| | | state: absent |
| | | tags: |
| | | - install_openshift_client_vm_packages |
| | | - name: Install bash-git-prompt for root |
| | | |
| | | - name: Install bash-git-prompt |
| | | git: |
| | | repo: https://github.com/magicmonty/bash-git-prompt.git |
| | | dest: /root/.bash-git-prompt |
| | | dest: "{{ item }}/.bash-git-prompt" |
| | | clone: yes |
| | | with_items: |
| | | - "/root" |
| | | - "/home/ec2-user" |
| | | - "/etc/skel" |
| | | - "/home/student" |
| | | tags: |
| | | - install_bash_customization |
| | | |
| | | - name: Install bash-git-prompt for ec2-user |
| | | git: |
| | | repo: https://github.com/magicmonty/bash-git-prompt.git |
| | | dest: /home/ec2-user/.bash-git-prompt |
| | | clone: yes |
| | | tags: |
| | | - install_bash_customization |
| | | - name: Change ownership of bash-git-prompt to ec2-user |
| | | - name: Change ownership of bash-git-prompt |
| | | file: |
| | | path: /home/ec2-user/.bash-git-prompt |
| | | owner: ec2-user |
| | | group: ec2-user |
| | | path: "{{ item.directory }}/.bash-git-prompt" |
| | | owner: "{{ item.user }}" |
| | | group: "{{ item.group }}" |
| | | recurse: yes |
| | | with_items: |
| | | - { directory: "/root", user: "root", group: "root" } |
| | | - { directory: "/home/ec2-user", user: "ec2-user", group: "ec2-user" } |
| | | - { directory: "/etc/skel", user: "root", group: "root" } |
| | | - { directory: "/home/student", user: "student", group: "users" } |
| | | tags: |
| | | - install_bash_customization |
| | | |
| | | - name: Install bash-git-prompt for student |
| | | git: |
| | | repo: https://github.com/magicmonty/bash-git-prompt.git |
| | | dest: /home/student/.bash-git-prompt |
| | | clone: yes |
| | | when: |
| | | - install_student_user|d(False)|bool |
| | | tags: |
| | | - install_bash_customization |
| | | - name: Change ownership of bash-git-prompt to student |
| | | file: |
| | | path: /home/student/.bash-git-prompt |
| | | owner: student |
| | | group: users |
| | | recurse: yes |
| | | when: |
| | | - install_student_user|d(False)|bool |
| | | - name: Install .bashrc |
| | | copy: |
| | | src: ../files/bashrc |
| | | dest: "{{ item.directory }}/.bashrc" |
| | | mode: 0644 |
| | | owner: "{{ item.user }}" |
| | | group: "{{ item.group }}" |
| | | with_items: |
| | | - { directory: "/root", user: "root", group: "root" } |
| | | - { directory: "/home/ec2-user", user: "ec2-user", group: "ec2-user" } |
| | | - { directory: "/etc/skel", user: "root", group: "root" } |
| | | - { directory: "/home/student", user: "student", group: "users" } |
| | | tags: |
| | | - install_bash_customization |
| | | |
| | | - name: Install .bashrc for root |
| | | copy: |
| | | src: ../files/bashrc |
| | | dest: /root/.bashrc |
| | | mode: 0644 |
| | | owner: root |
| | | group: root |
| | | tags: |
| | | - install_bash_customization |
| | | - name: Install .bashrc for ec2-user |
| | | copy: |
| | | src: ../files/bashrc |
| | | dest: /home/ec2-user/.bashrc |
| | | mode: 0644 |
| | | owner: ec2-user |
| | | group: ec2-user |
| | | tags: |
| | | - install_bash_customization |
| | | - name: Install .bashrc for student |
| | | copy: |
| | | src: ../files/bashrc |
| | | dest: /home/student/.bashrc |
| | | mode: 0644 |
| | | owner: student |
| | | group: users |
| | | when: |
| | | - install_student_user|d(False)|bool |
| | | tags: |
| | | - install_bash_customization |
| | | |
| | | - name: Install .bash_profile for root |
| | | - name: Install .bash_profile |
| | | copy: |
| | | src: ../files/bash_profile |
| | | dest: /root/.bash_profile |
| | | dest: "{{ item.directory }}/.bash_profile" |
| | | mode: 0644 |
| | | owner: root |
| | | group: root |
| | | tags: |
| | | - install_bash_customization |
| | | - name: Install .bash_profile for ec2-user |
| | | copy: |
| | | src: ../files/bash_profile |
| | | dest: /home/ec2-user/.bash_profile |
| | | mode: 0644 |
| | | owner: ec2-user |
| | | group: ec2-user |
| | | tags: |
| | | - install_bash_customization |
| | | - name: Install .bash_profile for student |
| | | copy: |
| | | src: ../files/bash_profile |
| | | dest: /home/student/.bash_profile |
| | | mode: 0644 |
| | | owner: student |
| | | group: users |
| | | when: |
| | | - install_student_user|d(False)|bool |
| | | owner: "{{ item.user }}" |
| | | group: "{{ item.group }}" |
| | | with_items: |
| | | - { directory: "/root", user: "root", group: "root" } |
| | | - { directory: "/home/ec2-user", user: "ec2-user", group: "ec2-user" } |
| | | - { directory: "/etc/skel", user: "root", group: "root" } |
| | | - { directory: "/home/student", user: "student", group: "users" } |
| | | tags: |
| | | - install_bash_customization |