Move tasks into new general role
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
---
|
||||
- name: Set authorized SSH keys
|
||||
authorized_key:
|
||||
user: "{{ ansible_facts.user_id }}"
|
||||
state: present
|
||||
key: "{{ item }}"
|
||||
with_file: authorized_keys
|
||||
|
||||
- name: Copy dotfiles to home directory
|
||||
copy:
|
||||
src: dotfiles/
|
||||
dest: "{{ ansible_facts.env.HOME }}/"
|
||||
mode: preserve
|
||||
|
||||
- name: Copy Git config to home directory
|
||||
template:
|
||||
src: gitconfig.j2
|
||||
dest: "{{ ansible_facts.env.HOME }}/.config/git/config"
|
||||
|
||||
- name: Remove unneeded files
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: absent
|
||||
loop:
|
||||
- "{{ ansible_facts.env.HOME }}/.bash_history"
|
||||
- "{{ ansible_facts.env.HOME }}/.zcompdump"
|
||||
|
||||
- name: Disable cron MAILTO
|
||||
cronvar:
|
||||
name: MAILTO
|
||||
value: ""
|
||||
|
||||
- name: Set up host-specific cronjobs
|
||||
cron: "{{ item }}"
|
||||
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
|
||||
Reference in New Issue
Block a user