Don't inject facts as vars

master
Lukas Bestle 5 years ago
parent bce3dc670b
commit 38b3239854
Signed by: lukas
GPG Key ID: 692037D104550FC9

@ -1,4 +1,5 @@
[defaults] [defaults]
inject_facts_as_vars = false
inventory = hosts inventory = hosts
transport = ssh transport = ssh

@ -8,7 +8,7 @@
- name: Copy config to home directory - name: Copy config to home directory
copy: copy:
src: home/ src: home/
dest: "{{ ansible_env.HOME }}/" dest: "{{ ansible_facts.env.HOME }}/"
mode: preserve mode: preserve
tags: radicale-update tags: radicale-update
notify: Restart Radicale notify: Restart Radicale
@ -16,13 +16,13 @@
- name: Copy service config - name: Copy service config
template: template:
src: service.ini.j2 src: service.ini.j2
dest: "{{ ansible_env.HOME }}/etc/services.d/radicale.ini" dest: "{{ ansible_facts.env.HOME }}/etc/services.d/radicale.ini"
notify: Reread service config notify: Reread service config
- name: Copy app config - name: Copy app config
template: template:
src: config.j2 src: config.j2
dest: "{{ ansible_env.HOME }}/radicale/config" dest: "{{ ansible_facts.env.HOME }}/radicale/config"
tags: radicale-update tags: radicale-update
notify: Restart Radicale notify: Restart Radicale
@ -52,12 +52,12 @@
- name: Initialize storage repository - name: Initialize storage repository
command: command:
chdir: "{{ ansible_env.HOME }}/radicale/storage" chdir: "{{ ansible_facts.env.HOME }}/radicale/storage"
cmd: git init cmd: git init
creates: "{{ ansible_env.HOME }}/radicale/storage/.git" creates: "{{ ansible_facts.env.HOME }}/radicale/storage/.git"
- name: Set up garbage collection cronjob - name: Set up garbage collection cronjob
cron: cron:
name: "Garbage-collection" name: "Garbage-collection"
special_time: weekly special_time: weekly
job: git --git-dir {{ ansible_env.HOME }}/radicale/storage/.git gc job: git --git-dir {{ ansible_facts.env.HOME }}/radicale/storage/.git gc

@ -3,14 +3,14 @@ hosts = 0.0.0.0:8080
[auth] [auth]
type = htpasswd type = htpasswd
htpasswd_filename = {{ ansible_env.HOME }}/radicale/users htpasswd_filename = {{ ansible_facts.env.HOME }}/radicale/users
htpasswd_encryption = bcrypt htpasswd_encryption = bcrypt
realm = bstl DAV - Password Required realm = bstl DAV - Password Required
[rights] [rights]
type = from_file type = from_file
file = {{ ansible_env.HOME }}/radicale/rights file = {{ ansible_facts.env.HOME }}/radicale/rights
[storage] [storage]
filesystem_folder = {{ ansible_env.HOME }}/radicale/storage filesystem_folder = {{ ansible_facts.env.HOME }}/radicale/storage
hook = git add -A && (git diff --cached --quiet || git commit -m "Changes by "%(user)s) hook = git add -A && (git diff --cached --quiet || git commit -m "Changes by "%(user)s)

@ -1,4 +1,4 @@
[program:radicale] [program:radicale]
command={{ ansible_env.HOME }}/.local/bin/radicale --config {{ ansible_env.HOME }}/radicale/config command={{ ansible_facts.env.HOME }}/.local/bin/radicale --config {{ ansible_facts.env.HOME }}/radicale/config
autostart=yes autostart=yes
autorestart=yes autorestart=yes

@ -8,7 +8,7 @@
- name: Copy config to home directory - name: Copy config to home directory
copy: copy:
src: home/ src: home/
dest: "{{ ansible_env.HOME }}/" dest: "{{ ansible_facts.env.HOME }}/"
mode: preserve mode: preserve
tags: gitea-update tags: gitea-update
notify: Restart Gitea notify: Restart Gitea
@ -16,13 +16,13 @@
- name: Copy service config - name: Copy service config
template: template:
src: service.ini.j2 src: service.ini.j2
dest: "{{ ansible_env.HOME }}/etc/services.d/gitea.ini" dest: "{{ ansible_facts.env.HOME }}/etc/services.d/gitea.ini"
notify: Reread service config notify: Reread service config
- name: Copy app config - name: Copy app config
template: template:
src: app.ini.j2 src: app.ini.j2
dest: "{{ ansible_env.HOME }}/gitea/custom/conf/app.ini" dest: "{{ ansible_facts.env.HOME }}/gitea/custom/conf/app.ini"
tags: gitea-update tags: gitea-update
notify: Restart Gitea notify: Restart Gitea

@ -3,7 +3,7 @@
; date: 2020-01-19 ; date: 2020-01-19
APP_NAME = codesignd Git APP_NAME = codesignd Git
RUN_USER = {{ ansible_user_id }} RUN_USER = {{ ansible_facts.user_id }}
RUN_MODE = prod RUN_MODE = prod
; Server settings ; Server settings

@ -1,5 +1,5 @@
[program:gitea] [program:gitea]
command={{ ansible_env.HOME }}/.linuxbrew/bin/gitea web command={{ ansible_facts.env.HOME }}/.linuxbrew/bin/gitea web
environment=GITEA_WORK_DIR={{ ansible_env.HOME }}/gitea environment=GITEA_WORK_DIR={{ ansible_facts.env.HOME }}/gitea
autostart=yes autostart=yes
autorestart=yes autorestart=yes

@ -3,12 +3,12 @@
git: git:
repo: "https://github.com/Homebrew/brew.git" repo: "https://github.com/Homebrew/brew.git"
version: master version: master
dest: "{{ ansible_env.HOME }}/.linuxbrew" dest: "{{ ansible_facts.env.HOME }}/.linuxbrew"
notify: Opt out from Homebrew analytics notify: Opt out from Homebrew analytics
- name: Install Homebrew formulae - name: Install Homebrew formulae
homebrew: homebrew:
name: "{{ homebrew_formulae }}" name: "{{ homebrew_formulae }}"
state: latest state: latest
path: "{{ ansible_env.HOME}}/.linuxbrew/bin" path: "{{ ansible_facts.env.HOME}}/.linuxbrew/bin"
update_homebrew: yes update_homebrew: yes

@ -3,9 +3,9 @@
import_role: import_role:
name: snapstromegon.uberspace_web_domain name: snapstromegon.uberspace_web_domain
vars: vars:
domain: kodos-{{ ansible_user_id }}.codesignd.net domain: kodos-{{ ansible_facts.user_id }}.codesignd.net
- name: Set up host site - name: Set up host site
template: template:
src: index.html.j2 src: index.html.j2
dest: /var/www/virtual/{{ ansible_user_id }}/html/index.html dest: /var/www/virtual/{{ ansible_facts.user_id }}/html/index.html

@ -4,7 +4,7 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>kodos-{{ ansible_user_id }}.codesignd.net</title> <title>kodos-{{ ansible_facts.user_id }}.codesignd.net</title>
<meta name="robots" content="noindex, nofollow"> <meta name="robots" content="noindex, nofollow">
<style> <style>
@ -116,7 +116,7 @@
<body> <body>
<main> <main>
<svg viewBox="0 0 1000 1000" xmlns="http://www.w3.org/2000/svg"><g fill="none"><path class="cog" d="M475.28 853.557L408.45 999.43a503.966 503.966 0 0 1-78.883-21.084l15.057-159.725a354.034 354.034 0 0 1-42.828-24.777l-130.73 92.853a510.782 510.782 0 0 1-57.761-57.762l92.853-130.729a354.034 354.034 0 0 1-24.777-42.828L21.655 670.434A503.967 503.967 0 0 1 .57 591.55l145.872-66.831a359.603 359.603 0 0 1-.85-24.72c0-8.31.287-16.553.85-24.72L.57 408.45a503.966 503.966 0 0 1 21.084-78.883l159.725 15.057a354.034 354.034 0 0 1 24.777-42.828l-92.853-130.73a510.782 510.782 0 0 1 57.762-57.761l130.729 92.853a354.034 354.034 0 0 1 42.828-24.777L329.566 21.655A503.967 503.967 0 0 1 408.45.57l66.831 145.872a359.404 359.404 0 0 1 49.44 0L591.55.57a503.966 503.966 0 0 1 78.883 21.084L655.377 181.38a354.034 354.034 0 0 1 42.828 24.777l130.73-92.853a510.782 510.782 0 0 1 57.761 57.762l-92.853 130.729a354.034 354.034 0 0 1 24.777 42.828l159.725-15.057a503.967 503.967 0 0 1 21.084 78.883L853.557 475.28a359.404 359.404 0 0 1 0 49.44l145.873 66.83a503.966 503.966 0 0 1-21.084 78.883L818.62 655.377a354.034 354.034 0 0 1-24.777 42.828l92.853 130.73a510.782 510.782 0 0 1-57.762 57.761l-130.729-92.853a354.034 354.034 0 0 1-42.828 24.777l15.057 159.725a503.967 503.967 0 0 1-78.883 21.084L524.72 853.557a359.404 359.404 0 0 1-49.44 0zM787.356 500c0-158.703-128.653-287.356-287.356-287.356S212.644 341.297 212.644 500 341.297 787.356 500 787.356 787.356 658.703 787.356 500z" fill="#F4B971"/><path stroke="#0BB888" stroke-width="57.471" d="M500 346.743l132.724 76.629v153.256L500 653.257l-132.724-76.629V423.372z"/><circle stroke="#ED8F1B" stroke-width="118.774" cx="500.001" cy="500" r="318.008"/></g></svg> <svg viewBox="0 0 1000 1000" xmlns="http://www.w3.org/2000/svg"><g fill="none"><path class="cog" d="M475.28 853.557L408.45 999.43a503.966 503.966 0 0 1-78.883-21.084l15.057-159.725a354.034 354.034 0 0 1-42.828-24.777l-130.73 92.853a510.782 510.782 0 0 1-57.761-57.762l92.853-130.729a354.034 354.034 0 0 1-24.777-42.828L21.655 670.434A503.967 503.967 0 0 1 .57 591.55l145.872-66.831a359.603 359.603 0 0 1-.85-24.72c0-8.31.287-16.553.85-24.72L.57 408.45a503.966 503.966 0 0 1 21.084-78.883l159.725 15.057a354.034 354.034 0 0 1 24.777-42.828l-92.853-130.73a510.782 510.782 0 0 1 57.762-57.761l130.729 92.853a354.034 354.034 0 0 1 42.828-24.777L329.566 21.655A503.967 503.967 0 0 1 408.45.57l66.831 145.872a359.404 359.404 0 0 1 49.44 0L591.55.57a503.966 503.966 0 0 1 78.883 21.084L655.377 181.38a354.034 354.034 0 0 1 42.828 24.777l130.73-92.853a510.782 510.782 0 0 1 57.761 57.762l-92.853 130.729a354.034 354.034 0 0 1 24.777 42.828l159.725-15.057a503.967 503.967 0 0 1 21.084 78.883L853.557 475.28a359.404 359.404 0 0 1 0 49.44l145.873 66.83a503.966 503.966 0 0 1-21.084 78.883L818.62 655.377a354.034 354.034 0 0 1-24.777 42.828l92.853 130.73a510.782 510.782 0 0 1-57.762 57.761l-130.729-92.853a354.034 354.034 0 0 1-42.828 24.777l15.057 159.725a503.967 503.967 0 0 1-78.883 21.084L524.72 853.557a359.404 359.404 0 0 1-49.44 0zM787.356 500c0-158.703-128.653-287.356-287.356-287.356S212.644 341.297 212.644 500 341.297 787.356 500 787.356 787.356 658.703 787.356 500z" fill="#F4B971"/><path stroke="#0BB888" stroke-width="57.471" d="M500 346.743l132.724 76.629v153.256L500 653.257l-132.724-76.629V423.372z"/><circle stroke="#ED8F1B" stroke-width="118.774" cx="500.001" cy="500" r="318.008"/></g></svg>
<h1><span>kodos-{{ ansible_user_id }}</span>.codesignd.net</h1> <h1><span>kodos-{{ ansible_facts.user_id }}</span>.codesignd.net</h1>
</main> </main>
<footer> <footer>

@ -2,14 +2,14 @@
- name: Set up email redirect - name: Set up email redirect
copy: copy:
content: "{{ mail_redirect_to }}" content: "{{ mail_redirect_to }}"
dest: "{{ ansible_env.HOME }}/.qmail" dest: "{{ ansible_facts.env.HOME }}/.qmail"
- name: Delete catch-all address and local Maildirs - name: Delete catch-all address and local Maildirs
file: file:
path: "{{ item }}" path: "{{ item }}"
state: absent state: absent
loop: loop:
- "{{ ansible_env.HOME }}/.spamfolder" - "{{ ansible_facts.env.HOME }}/.spamfolder"
- "{{ ansible_env.HOME }}/.qmail-default" - "{{ ansible_facts.env.HOME }}/.qmail-default"
- "{{ ansible_env.HOME }}/Maildir" - "{{ ansible_facts.env.HOME }}/Maildir"
- "{{ ansible_env.HOME }}/users" - "{{ ansible_facts.env.HOME }}/users"

@ -7,11 +7,11 @@
- name: Add configured domains to Uberspace config - name: Add configured domains to Uberspace config
shell: "uberspace mail domain add $(idn {{ item }})" shell: "uberspace mail domain add $(idn {{ item }})"
when: item not in uberspace_mail_domain_result.stdout_lines when: item not in uberspace_mail_domain_result.stdout_lines
loop: "{{ mail_domains.get(ansible_user_id, []) }}" loop: "{{ mail_domains.get(ansible_facts.user_id, []) }}"
- name: Delete system Maildir - name: Delete system Maildir
file: file:
path: "{{ ansible_env.HOME }}/Maildir" path: "{{ ansible_facts.env.HOME }}/Maildir"
state: absent state: absent
- name: Set up local mail user - name: Set up local mail user
@ -19,7 +19,7 @@
name: snapstromegon.uberspace_mail_user name: snapstromegon.uberspace_mail_user
vars: vars:
user: lukas user: lukas
password: "{{ mail_passwords[ansible_user_id] }}" password: "{{ mail_passwords[ansible_facts.user_id] }}"
- name: Enable catchall mode - name: Enable catchall mode
import_role: import_role:
@ -30,11 +30,11 @@
- name: Create qdated key - name: Create qdated key
command: command:
cmd: qdated-makekey cmd: qdated-makekey
creates: "{{ ansible_env.HOME }}/.qdated-key" creates: "{{ ansible_facts.env.HOME }}/.qdated-key"
- name: Read qdated key - name: Read qdated key
slurp: slurp:
src: "{{ ansible_env.HOME }}/.qdated-key" src: "{{ ansible_facts.env.HOME }}/.qdated-key"
register: qdated_key register: qdated_key
no_log: yes no_log: yes
@ -46,14 +46,14 @@
- name: Set up .qmail-dated-default file - name: Set up .qmail-dated-default file
template: template:
src: qmail-dated.j2 src: qmail-dated.j2
dest: "{{ ansible_env.HOME }}/.qmail-dated-default" dest: "{{ ansible_facts.env.HOME }}/.qmail-dated-default"
- name: Create mutt config directory - name: Create mutt config directory
file: file:
path: "{{ ansible_env.HOME }}/.mutt" path: "{{ ansible_facts.env.HOME }}/.mutt"
state: directory state: directory
- name: Set up mutt config - name: Set up mutt config
template: template:
src: muttrc.j2 src: muttrc.j2
dest: "{{ ansible_env.HOME }}/.mutt/muttrc" dest: "{{ ansible_facts.env.HOME }}/.mutt/muttrc"

@ -16,7 +16,7 @@ macro index c "<change-folder>?<toggle-mailboxes>" "open a different folder"
macro pager c "<change-folder>?<toggle-mailboxes>" "open a different folder" macro pager c "<change-folder>?<toggle-mailboxes>" "open a different folder"
# Sender # Sender
set from="Lukas Bestle <{{ mail_default_address[ansible_user_id] }}>" set from="Lukas Bestle <{{ mail_default_address[ansible_facts.user_id] }}>"
# Sorting # Sorting
set sort=threads set sort=threads

@ -1,3 +1,3 @@
# Email address is valid for 7 days # Email address is valid for 7 days
|~/.linuxbrew/bin/qdated-check 604800 |~/.linuxbrew/bin/qdated-check 604800
{{ ansible_user_id }}-lukas {{ ansible_facts.user_id }}-lukas

@ -1,13 +1,13 @@
--- ---
- name: Set authorized SSH keys - name: Set authorized SSH keys
authorized_key: authorized_key:
user: "{{ ansible_user_id }}" user: "{{ ansible_facts.user_id }}"
state: present state: present
key: "{{ item }}" key: "{{ item }}"
with_file: authorized_keys with_file: authorized_keys
- name: Get current shell - name: Get current shell
shell: "getent passwd {{ ansible_user_id }} | cut -d: -f7" shell: "getent passwd {{ ansible_facts.user_id }} | cut -d: -f7"
register: current_shell register: current_shell
changed_when: no changed_when: no
@ -18,37 +18,37 @@
- name: Copy dotfiles to home directory - name: Copy dotfiles to home directory
copy: copy:
src: dotfiles/ src: dotfiles/
dest: "{{ ansible_env.HOME }}/" dest: "{{ ansible_facts.env.HOME }}/"
mode: preserve mode: preserve
- name: Copy Git config to home directory - name: Copy Git config to home directory
template: template:
src: gitconfig.j2 src: gitconfig.j2
dest: "{{ ansible_env.HOME }}/.config/git/config" dest: "{{ ansible_facts.env.HOME }}/.config/git/config"
- name: Remove unneeded files - name: Remove unneeded files
file: file:
path: "{{ item }}" path: "{{ item }}"
state: absent state: absent
loop: loop:
- "{{ ansible_env.HOME }}/.bash_history" - "{{ ansible_facts.env.HOME }}/.bash_history"
- "{{ ansible_env.HOME }}/.bash_logout" - "{{ ansible_facts.env.HOME }}/.bash_logout"
- "{{ ansible_env.HOME }}/.bash_profile" - "{{ ansible_facts.env.HOME }}/.bash_profile"
- "{{ ansible_env.HOME }}/.bashrc" - "{{ ansible_facts.env.HOME }}/.bashrc"
- "{{ ansible_env.HOME }}/.emacs" - "{{ ansible_facts.env.HOME }}/.emacs"
- "{{ ansible_env.HOME }}/.zcompdump" - "{{ ansible_facts.env.HOME }}/.zcompdump"
- "{{ ansible_env.HOME }}/.zshrc" - "{{ ansible_facts.env.HOME }}/.zshrc"
- name: Download and update iTerm2 shell integration - name: Download and update iTerm2 shell integration
get_url: get_url:
url: https://iterm2.com/shell_integration/fish url: https://iterm2.com/shell_integration/fish
dest: "{{ ansible_env.HOME }}/.config/fish/conf.d/iterm2_integration.fish" dest: "{{ ansible_facts.env.HOME }}/.config/fish/conf.d/iterm2_integration.fish"
force: yes force: yes
- name: Download and update Oh My Fish! packages - name: Download and update Oh My Fish! packages
git: git:
repo: "{{ item.value }}" repo: "{{ item.value }}"
dest: "{{ ansible_env.HOME }}/.config/fish/pkgs/{{ item.key }}" dest: "{{ ansible_facts.env.HOME }}/.config/fish/pkgs/{{ item.key }}"
loop: "{{ omf_pkgs | dict2items }}" loop: "{{ omf_pkgs | dict2items }}"
notify: Collect fish functions from packages notify: Collect fish functions from packages

@ -1,6 +1,6 @@
; user settings ; user settings
[user] [user]
name = kodos-{{ ansible_user_id }}.codesignd.net name = kodos-{{ ansible_facts.user_id }}.codesignd.net
email = hostmaster@codesignd.net email = hostmaster@codesignd.net
; core settings ; core settings

@ -2,29 +2,29 @@
- name: Copy config to home directory - name: Copy config to home directory
copy: copy:
src: home/ src: home/
dest: "{{ ansible_env.HOME }}/" dest: "{{ ansible_facts.env.HOME }}/"
mode: preserve mode: preserve
- name: Create link at ~/web - name: Create link at ~/web
file: file:
src: /var/www/virtual/{{ ansible_user_id }} src: /var/www/virtual/{{ ansible_facts.user_id }}
dest: "{{ ansible_env.HOME }}/web" dest: "{{ ansible_facts.env.HOME }}/web"
state: link state: link
- name: Initialize ~/web/sites - name: Initialize ~/web/sites
file: file:
path: /var/www/virtual/{{ ansible_user_id }}/sites path: /var/www/virtual/{{ ansible_facts.user_id }}/sites
state: directory state: directory
- name: Download and update projectr - name: Download and update projectr
git: git:
repo: https://github.com/lukasbestle/projectr.git repo: https://github.com/lukasbestle/projectr.git
dest: "{{ ansible_env.HOME }}/.config/fish/pkgs/projectr" dest: "{{ ansible_facts.env.HOME }}/.config/fish/pkgs/projectr"
- name: Set up deploy script - name: Set up deploy script
template: template:
src: deploy.php.j2 src: deploy.php.j2
dest: /var/www/virtual/{{ ansible_user_id }}/html/deploy.php dest: /var/www/virtual/{{ ansible_facts.user_id }}/html/deploy.php
- name: Read existing Uberspace domains - name: Read existing Uberspace domains
command: uberspace web domain list command: uberspace web domain list
@ -34,15 +34,15 @@
- name: Add configured domains to Uberspace config - name: Add configured domains to Uberspace config
shell: "uberspace web domain add $(idn {{ item.key }})" shell: "uberspace web domain add $(idn {{ item.key }})"
when: item.key not in uberspace_web_domain_result.stdout_lines when: item.key not in uberspace_web_domain_result.stdout_lines
loop: "{{ web_links.get(ansible_user_id, {}) | dict2items }}" loop: "{{ web_links.get(ansible_facts.user_id, {}) | dict2items }}"
- name: Set up sites using projectr - name: Set up sites using projectr
command: command:
argv: argv:
- site_add - site_add
- "{{ item.key }}" - "{{ item.key }}"
creates: /var/www/virtual/{{ ansible_user_id }}/sites/{{ item.key }} creates: /var/www/virtual/{{ ansible_facts.user_id }}/sites/{{ item.key }}
loop: "{{ web_sites.get(ansible_user_id, {}) | dict2items }}" loop: "{{ web_sites.get(ansible_facts.user_id, {}) | dict2items }}"
- name: Set up site origins using projectr (sites with origin) - name: Set up site origins using projectr (sites with origin)
command: command:
@ -50,8 +50,8 @@
- site_origin - site_origin
- "{{ item.key }}" - "{{ item.key }}"
- "{{ item.value }}" - "{{ item.value }}"
creates: /var/www/virtual/{{ ansible_user_id }}/sites/{{ item.key }}/.origin creates: /var/www/virtual/{{ ansible_facts.user_id }}/sites/{{ item.key }}/.origin
loop: "{{ web_sites.get(ansible_user_id, {}) | dict2items }}" loop: "{{ web_sites.get(ansible_facts.user_id, {}) | dict2items }}"
when: item.value != None when: item.value != None
- name: Set up site origins using projectr (sites without origin) - name: Set up site origins using projectr (sites without origin)
@ -59,8 +59,8 @@
argv: argv:
- site_origin - site_origin
- "{{ item.key }}" - "{{ item.key }}"
removes: /var/www/virtual/{{ ansible_user_id }}/sites/{{ item.key }}/.origin removes: /var/www/virtual/{{ ansible_facts.user_id }}/sites/{{ item.key }}/.origin
loop: "{{ web_sites.get(ansible_user_id, {}) | dict2items }}" loop: "{{ web_sites.get(ansible_facts.user_id, {}) | dict2items }}"
when: item.value == None when: item.value == None
- name: Deploy sites using projectr (sites with origin) - name: Deploy sites using projectr (sites with origin)
@ -68,8 +68,8 @@
argv: argv:
- site_deploy - site_deploy
- "{{ item.key }}" - "{{ item.key }}"
creates: /var/www/virtual/{{ ansible_user_id }}/sites/{{ item.key }}/current creates: /var/www/virtual/{{ ansible_facts.user_id }}/sites/{{ item.key }}/current
loop: "{{ web_sites.get(ansible_user_id, {}) | dict2items }}" loop: "{{ web_sites.get(ansible_facts.user_id, {}) | dict2items }}"
when: item.value != None when: item.value != None
- name: Link sites to domains - name: Link sites to domains
@ -79,19 +79,19 @@
- "{{ item.value.site }}" - "{{ item.value.site }}"
- "{{ item.key }}" - "{{ item.key }}"
- "{{ item.value.get('path', '') }}" - "{{ item.value.get('path', '') }}"
creates: /var/www/virtual/{{ ansible_user_id }}/{{ item.key }} creates: /var/www/virtual/{{ ansible_facts.user_id }}/{{ item.key }}
loop: "{{ web_links.get(ansible_user_id, {}) | dict2items }}" loop: "{{ web_links.get(ansible_facts.user_id, {}) | dict2items }}"
- name: Ensure that qdated directories for all Mail Uberspaces exist - name: Ensure that qdated directories for all Mail Uberspaces exist
file: file:
path: "{{ ansible_env.HOME }}/.config/qdated/{{ hostvars[item].ansible_user_id }}" path: "{{ ansible_facts.env.HOME }}/.config/qdated/{{ hostvars[item].ansible_facts.user_id }}"
state: directory state: directory
loop: "{{ groups.mail }}" loop: "{{ groups.mail }}"
- name: Copy qdated keys from all Mail Uberspaces - name: Copy qdated keys from all Mail Uberspaces
copy: copy:
content: "{{ hostvars[item].qdated_key }}" content: "{{ hostvars[item].qdated_key }}"
dest: "{{ ansible_env.HOME }}/.config/qdated/{{ hostvars[item].ansible_user_id }}/.qdated-key" dest: "{{ ansible_facts.env.HOME }}/.config/qdated/{{ hostvars[item].ansible_facts.user_id }}/.qdated-key"
loop: "{{ groups.mail }}" loop: "{{ groups.mail }}"
- name: Set up qdated address generation cronjob - name: Set up qdated address generation cronjob
@ -99,7 +99,7 @@
name: "qdated generation" name: "qdated generation"
hour: "2" hour: "2"
minute: "3" minute: "3"
job: "{{ ansible_env.HOME }}/bin/qdated-generate" job: "{{ ansible_facts.env.HOME }}/bin/qdated-generate"
- name: Check if the access log is enabled - name: Check if the access log is enabled
command: uberspace web log access status command: uberspace web log access status

@ -21,7 +21,7 @@ define('SECRET', '{{ projectr_deploy_secret }}');
// Path where you installed the scripts from the "bin" directory of this repository // Path where you installed the scripts from the "bin" directory of this repository
// This is required, as PHP doesn't automatically use the environment and therefore your $PATH from your shell // This is required, as PHP doesn't automatically use the environment and therefore your $PATH from your shell
define('TOOLKIT_PATH', '/home/{{ ansible_user_id }}/.config/fish/pkgs/projectr/bin'); define('TOOLKIT_PATH', '/home/{{ ansible_facts.user_id }}/.config/fish/pkgs/projectr/bin');
// 2. Setup // 2. Setup
// ==================== // ====================

Loading…
Cancel
Save