Move tasks into new general role
This commit is contained in:
@@ -6,15 +6,6 @@
|
|||||||
key: "{{ item }}"
|
key: "{{ item }}"
|
||||||
with_file: authorized_keys
|
with_file: authorized_keys
|
||||||
|
|
||||||
- name: Get current shell
|
|
||||||
shell: "getent passwd {{ ansible_facts.user_id }} | cut -d: -f7"
|
|
||||||
register: current_shell
|
|
||||||
changed_when: no
|
|
||||||
|
|
||||||
- name: Change shell to fish
|
|
||||||
command: chsh --shell /usr/bin/fish
|
|
||||||
when: "current_shell.stdout != '/usr/bin/fish'"
|
|
||||||
|
|
||||||
- name: Copy dotfiles to home directory
|
- name: Copy dotfiles to home directory
|
||||||
copy:
|
copy:
|
||||||
src: dotfiles/
|
src: dotfiles/
|
||||||
@@ -34,19 +25,6 @@
|
|||||||
- "{{ ansible_facts.env.HOME }}/.bash_history"
|
- "{{ ansible_facts.env.HOME }}/.bash_history"
|
||||||
- "{{ ansible_facts.env.HOME }}/.zcompdump"
|
- "{{ ansible_facts.env.HOME }}/.zcompdump"
|
||||||
|
|
||||||
- name: Download and update iTerm2 shell integration
|
|
||||||
get_url:
|
|
||||||
url: https://iterm2.com/shell_integration/fish
|
|
||||||
dest: "{{ ansible_facts.env.HOME }}/.config/fish/conf.d/iterm2_integration.fish"
|
|
||||||
force: yes
|
|
||||||
|
|
||||||
- name: Download and update Oh My Fish! packages
|
|
||||||
git:
|
|
||||||
repo: "{{ item.value }}"
|
|
||||||
dest: "{{ ansible_facts.env.HOME }}/.config/fish/pkgs/{{ item.key }}"
|
|
||||||
loop: "{{ omf_pkgs | dict2items }}"
|
|
||||||
notify: Collect fish functions from packages
|
|
||||||
|
|
||||||
- name: Disable cron MAILTO
|
- name: Disable cron MAILTO
|
||||||
cronvar:
|
cronvar:
|
||||||
name: MAILTO
|
name: MAILTO
|
||||||
@@ -55,3 +33,14 @@
|
|||||||
- name: Set up host-specific cronjobs
|
- name: Set up host-specific cronjobs
|
||||||
cron: "{{ item }}"
|
cron: "{{ item }}"
|
||||||
loop: "{{ cronjobs.get(ansible_facts.user_id, []) }}"
|
loop: "{{ cronjobs.get(ansible_facts.user_id, []) }}"
|
||||||
|
|
||||||
|
- name: Add host domain to Uberspace config
|
||||||
|
import_role:
|
||||||
|
name: snapstromegon.uberspace_web_domain
|
||||||
|
vars:
|
||||||
|
domain: kodos-{{ ansible_facts.user_id }}.codesignd.net
|
||||||
|
|
||||||
|
- name: Set up host site
|
||||||
|
template:
|
||||||
|
src: index.html.j2
|
||||||
|
dest: /var/www/virtual/{{ ansible_facts.user_id }}/html/index.html
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Add host domain to Uberspace config
|
|
||||||
import_role:
|
|
||||||
name: snapstromegon.uberspace_web_domain
|
|
||||||
vars:
|
|
||||||
domain: kodos-{{ ansible_facts.user_id }}.codesignd.net
|
|
||||||
|
|
||||||
- name: Set up host site
|
|
||||||
template:
|
|
||||||
src: index.html.j2
|
|
||||||
dest: /var/www/virtual/{{ ansible_facts.user_id }}/html/index.html
|
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
---
|
||||||
|
- name: Get current shell
|
||||||
|
shell: "getent passwd {{ ansible_facts.user_id }} | cut -d: -f7"
|
||||||
|
register: current_shell
|
||||||
|
changed_when: no
|
||||||
|
|
||||||
|
- name: Change shell to fish
|
||||||
|
command: chsh --shell /usr/bin/fish
|
||||||
|
when: "current_shell.stdout != '/usr/bin/fish'"
|
||||||
|
|
||||||
|
- name: Download and update iTerm2 shell integration
|
||||||
|
get_url:
|
||||||
|
url: https://iterm2.com/shell_integration/fish
|
||||||
|
dest: "{{ ansible_facts.env.HOME }}/.config/fish/conf.d/iterm2_integration.fish"
|
||||||
|
force: yes
|
||||||
|
|
||||||
|
- name: Download and update Oh My Fish! packages
|
||||||
|
git:
|
||||||
|
repo: "{{ item.value }}"
|
||||||
|
dest: "{{ ansible_facts.env.HOME }}/.config/fish/pkgs/{{ item.key }}"
|
||||||
|
loop: "{{ omf_pkgs | dict2items }}"
|
||||||
|
notify: Collect fish functions from packages
|
||||||
@@ -5,9 +5,9 @@
|
|||||||
- vars/config.yml
|
- vars/config.yml
|
||||||
- vars/installs.yml
|
- vars/installs.yml
|
||||||
roles:
|
roles:
|
||||||
|
- general
|
||||||
- homebrew
|
- homebrew
|
||||||
- host-site
|
- shell
|
||||||
- terminal
|
|
||||||
|
|
||||||
- name: Redirect mail from non-mail Uberspaces
|
- name: Redirect mail from non-mail Uberspaces
|
||||||
hosts: "!mail"
|
hosts: "!mail"
|
||||||
|
|||||||
Reference in New Issue
Block a user