diff options
author | Ismaël Bouya <ismael.bouya@fretlink.com> | 2018-11-08 09:47:54 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@fretlink.com> | 2018-11-08 09:47:54 +0100 |
commit | cf86d448f96ede049c04d8165931f92a82f35956 (patch) | |
tree | 915a6fd5f4748559abbe74bd9806f5a01eaada73 /roles/contexts/fretlink/tasks/main.yml | |
parent | de1c634c1fda61e34522595b40c66af17681bd14 (diff) | |
download | Ansible-cf86d448f96ede049c04d8165931f92a82f35956.tar.gz Ansible-cf86d448f96ede049c04d8165931f92a82f35956.tar.zst Ansible-cf86d448f96ede049c04d8165931f92a82f35956.zip |
Put tasks in blocks
Diffstat (limited to 'roles/contexts/fretlink/tasks/main.yml')
-rw-r--r-- | roles/contexts/fretlink/tasks/main.yml | 45 |
1 files changed, 24 insertions, 21 deletions
diff --git a/roles/contexts/fretlink/tasks/main.yml b/roles/contexts/fretlink/tasks/main.yml index bbeae93..b1b163a 100644 --- a/roles/contexts/fretlink/tasks/main.yml +++ b/roles/contexts/fretlink/tasks/main.yml | |||
@@ -17,30 +17,33 @@ | |||
17 | file: | 17 | file: |
18 | path: $XDG_CONFIG_HOME/pm2 | 18 | path: $XDG_CONFIG_HOME/pm2 |
19 | state: directory | 19 | state: directory |
20 | - name: workdir scripts | 20 | - name: workdir |
21 | synchronize: | 21 | block: |
22 | recursive: yes | 22 | - name: workdir scripts |
23 | archive: no | 23 | synchronize: |
24 | checksum: yes | 24 | recursive: yes |
25 | src: workdir/ | 25 | archive: no |
26 | dest: /$HOME/workdir/ | 26 | checksum: yes |
27 | - name: chmod workdir script | 27 | src: workdir/ |
28 | file: | 28 | dest: /$HOME/workdir/ |
29 | path: $HOME/workdir/start | 29 | - name: chmod workdir script |
30 | mode: 0755 | 30 | file: |
31 | path: $HOME/workdir/start | ||
32 | mode: 0755 | ||
33 | - name: environment variables file | ||
34 | block: | ||
35 | - name: extract environment | ||
36 | shell: "pass show Travail/Fretlink/Environment" | ||
37 | register: fretlink_environment | ||
38 | changed_when: false | ||
39 | check_mode: no | ||
40 | - name: store environment | ||
41 | copy: | ||
42 | dest: $HOME/workdir/environment | ||
43 | content: "{{ fretlink_environment.stdout }}" | ||
31 | - name: enable remind service | 44 | - name: enable remind service |
32 | systemd: | 45 | systemd: |
33 | state: started | 46 | state: started |
34 | scope: user | 47 | scope: user |
35 | name: remind@work.service | 48 | name: remind@work.service |
36 | enabled: true | 49 | enabled: true |
37 | - name: extract environment | ||
38 | shell: "pass show Travail/Fretlink/Environment" | ||
39 | register: fretlink_environment | ||
40 | changed_when: false | ||
41 | check_mode: no | ||
42 | - name: store environment | ||
43 | copy: | ||
44 | dest: $HOME/workdir/environment | ||
45 | content: "{{ fretlink_environment.stdout }}" | ||
46 | backup: true | ||