Replace all .key

This commit is contained in:
Dryusdan 2021-01-24 17:05:02 +01:00
parent b9b59122d3
commit e6ba5fa2ee
2 changed files with 19 additions and 19 deletions

View File

@ -17,7 +17,7 @@
loop: "{{ ghost }}" loop: "{{ ghost }}"
become: yes become: yes
become_user : "{{ item.account }}" become_user : "{{ item.account }}"
when: ghost_deploy_site in item.key when: ghost_deploy_site in item.name
- name: "Add blog log directory" - name: "Add blog log directory"
file: file:
@ -33,7 +33,7 @@
owner: "{{ item.account }}" owner: "{{ item.account }}"
group: "{{ item.account }}" group: "{{ item.account }}"
loop: "{{ ghost }}" loop: "{{ ghost }}"
when: ghost_deploy_site in item.key when: ghost_deploy_site in item.name
- name: "Download Ghost" - name: "Download Ghost"
get_url: get_url:
@ -43,14 +43,14 @@
loop: "{{ ghost }}" loop: "{{ ghost }}"
become: yes become: yes
become_user : "{{ item.account }}" become_user : "{{ item.account }}"
when: ghost_deploy_site in item.key when: ghost_deploy_site in item.name
- name: "Delete www" - name: "Delete www"
file: file:
path: "{{ item.home }}/www" path: "{{ item.home }}/www"
state: absent state: absent
loop: "{{ ghost }}" loop: "{{ ghost }}"
when: ghost_deploy_site in item.key when: ghost_deploy_site in item.name
- name: "Unzip Ghost" - name: "Unzip Ghost"
shell: "unzip -o ghost-latest.zip -d www" shell: "unzip -o ghost-latest.zip -d www"
@ -59,7 +59,7 @@
loop: "{{ ghost }}" loop: "{{ ghost }}"
become: yes become: yes
become_user : "{{ item.account }}" become_user : "{{ item.account }}"
when: ghost_deploy_site in item.key when: ghost_deploy_site in item.name
- name: "Unzip content folder Ghost" - name: "Unzip content folder Ghost"
shell: "unzip -o ghost-latest.zip 'content/*' -d ./" shell: "unzip -o ghost-latest.zip 'content/*' -d ./"
@ -68,14 +68,14 @@
with_dict: "{{ ghost }}" with_dict: "{{ ghost }}"
become: yes become: yes
become_user : "{{ item.account }}" become_user : "{{ item.account }}"
when: ghost_deploy_site in item.key when: ghost_deploy_site in item.name
- name: "Delete content" - name: "Delete content"
file: file:
path: "{{ item.home }}/www/content" path: "{{ item.home }}/www/content"
state: absent state: absent
loop: "{{ ghost }}" loop: "{{ ghost }}"
when: ghost_deploy_site in item.key when: ghost_deploy_site in item.name
- name: "Symlink content" - name: "Symlink content"
file: file:
@ -85,7 +85,7 @@
owner: "{{ item.account }}" owner: "{{ item.account }}"
group: "{{ item.account }}" group: "{{ item.account }}"
loop: "{{ ghost }}" loop: "{{ ghost }}"
when: ghost_deploy_site in item.key when: ghost_deploy_site in item.name
become: yes become: yes
become_user : "{{ item.account }}" become_user : "{{ item.account }}"
@ -96,14 +96,14 @@
owner: "{{ item.account }}" owner: "{{ item.account }}"
group: "{{ item.account }}" group: "{{ item.account }}"
loop: "{{ ghost }}" loop: "{{ ghost }}"
when: ghost_deploy_site in item.key when: ghost_deploy_site in item.name
- name: "Config daemon" - name: "Config daemon"
template: template:
src: "systemd.service.j2" src: "systemd.service.j2"
dest: "/etc/systemd/system/{{ item.name }}.service" dest: "/etc/systemd/system/{{ item.name }}.service"
loop: "{{ ghost }}" loop: "{{ ghost }}"
when: ghost_deploy_site in item.key when: ghost_deploy_site in item.name
- name: "Install node modules" - name: "Install node modules"
shell: "NODE_ENV=production npm i" shell: "NODE_ENV=production npm i"
@ -112,7 +112,7 @@
loop: "{{ ghost }}" loop: "{{ ghost }}"
become: yes become: yes
become_user : "{{ item.account }}" become_user : "{{ item.account }}"
when: ghost_deploy_site in item.key when: ghost_deploy_site in item.name
- name: "Install yarn module" - name: "Install yarn module"
shell: "NODE_ENV=production yarn install" shell: "NODE_ENV=production yarn install"
@ -121,7 +121,7 @@
loop: "{{ ghost }}" loop: "{{ ghost }}"
become: yes become: yes
become_user : "{{ item.account }}" become_user : "{{ item.account }}"
when: ghost_deploy_site in item.key when: ghost_deploy_site in item.name
- name: "Knex init" - name: "Knex init"
shell: "NODE_ENV=production node_modules/knex-migrator/bin/knex-migrator init" shell: "NODE_ENV=production node_modules/knex-migrator/bin/knex-migrator init"
@ -130,7 +130,7 @@
loop: "{{ ghost }}" loop: "{{ ghost }}"
become: yes become: yes
become_user : "{{ item.account }}" become_user : "{{ item.account }}"
when: ghost_deploy_site in item.key when: ghost_deploy_site in item.name
- name: "Knex migrate" - name: "Knex migrate"
shell: "NODE_ENV=production node_modules/knex-migrator/bin/knex-migrator migrate" shell: "NODE_ENV=production node_modules/knex-migrator/bin/knex-migrator migrate"
@ -139,7 +139,7 @@
loop: "{{ ghost }}" loop: "{{ ghost }}"
become: yes become: yes
become_user : "{{ item.account }}" become_user : "{{ item.account }}"
when: ghost_deploy_site in item.key when: ghost_deploy_site in item.name
- name: "Reload systemctl" - name: "Reload systemctl"
systemd: systemd:
@ -150,21 +150,21 @@
name: "{{ item.name }}.service" name: "{{ item.name }}.service"
enabled: yes enabled: yes
loop: "{{ ghost }}" loop: "{{ ghost }}"
when: ghost_deploy_site in item.key when: ghost_deploy_site in item.name
- name: "Restart service" - name: "Restart service"
systemd: systemd:
name: "{{ item.name }}.service" name: "{{ item.name }}.service"
state: restarted state: restarted
loop: "{{ ghost }}" loop: "{{ ghost }}"
when: ghost_deploy_site in item.key when: ghost_deploy_site in item.name
- name: "Delete archive" - name: "Delete archive"
file: file:
path: "{{ item.home }}/ghost-latest.zip" path: "{{ item.home }}/ghost-latest.zip"
state: absent state: absent
loop: "{{ ghost }}" loop: "{{ ghost }}"
when: ghost_deploy_site in item.key when: ghost_deploy_site in item.name
- name: "Clean cache yarn" - name: "Clean cache yarn"
shell: "yarn cache clean" shell: "yarn cache clean"
@ -173,7 +173,7 @@
loop: "{{ ghost }}" loop: "{{ ghost }}"
become: yes become: yes
become_user : "{{ item.account }}" become_user : "{{ item.account }}"
when: ghost_deploy_site in item.key when: ghost_deploy_site in item.name
- name: "NPM Cache clean" - name: "NPM Cache clean"
shell: "npm cache clean --force" shell: "npm cache clean --force"
@ -182,4 +182,4 @@
loop: "{{ ghost }}" loop: "{{ ghost }}"
become: yes become: yes
become_user : "{{ item.account }}" become_user : "{{ item.account }}"
when: ghost_deploy_site in item.key when: ghost_deploy_site in item.name