@installdoc/ansible-gas-station
Version:
An Ansible playbook that provisions your network with software from GitHub Awesome lists, developed with disaster recovery in mind ⛽🔥🤤
29 lines (26 loc) • 875 B
YAML
- name: "Ensure the PowerShell config directory exists (User: {{ user.username }})"
become: true
become_user: "{{ user.username }}"
file:
path: "{{ item }}"
state: directory
owner: "{{ user.username }}"
group: "{{ user.group | default(omit) }}"
mode: 0700
loop:
- ~/.config
- ~/.config/powershell
- name: "Fetch the initialization command (User: {{ user.username }})" # noqa 503
command: "{{ starship_path }} init powershell"
register: starship_out
changed_when: false
- name: "Create the Initialization script for powershell (User: {{ user.username }})" # noqa 503
become: true
become_user: "{{ user.username }}"
copy:
dest: "~/.config/powershell/Microsoft.PowerShell_profile.ps1"
content: "{{ starship_out.stdout }}"
owner: "{{ user.username }}"
group: "{{ user.group | default(omit) }}"
mode: 0700