diff options
Diffstat (limited to 'roles/http')
| -rw-r--r-- | roles/http/tasks/main.yml | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/roles/http/tasks/main.yml b/roles/http/tasks/main.yml index 37e8f3e..90914df 100644 --- a/roles/http/tasks/main.yml +++ b/roles/http/tasks/main.yml @@ -51,18 +51,24 @@ name: nginx state: restarted +- name: Create joeac.net src directory + become: false + ansible.builtin.file: + path: ~{{ ansible_ssh_user }}/src + state: directory + - name: Checkout joeac.net source code become: false ansible.builtin.git: repo: git://git.joeac.net/joeac.net.git - dest: "{{ src_dir }}/joeac.net" + dest: ~{{ ansible_ssh_user }}/src/joeac.net depth: 1 version: main - name: Build joeac.net website become: false community.general.make: - chdir: "{{ src_dir }}/joeac.net/http" + chdir: ~{{ ansible_ssh_user }}/src/joeac.net/http - name: Create joeac.net public directory ansible.builtin.file: @@ -75,29 +81,29 @@ become: false ansible.builtin.template: src: config.ini - dest: "{{ src_dir }}/joeac.net/http/config.ini" + dest: ~{{ ansible_ssh_user }}/src/joeac.net/http/config.ini - name: Symlink config.ini ansible.builtin.file: - src: "{{ src_dir }}/joeac.net/http/config.ini" + src: ~{{ ansible_ssh_user }}/src/joeac.net/http/config.ini dest: "{{ http_files_dir }}/config.ini" state: link - name: Symlink vendor to public directory ansible.builtin.file: - src: "{{ src_dir }}/joeac.net/http/vendor" + src: ~{{ ansible_ssh_user }}/src/joeac.net/http/vendor dest: "{{ http_files_dir }}/vendor" state: link - name: Symlink php to public directory ansible.builtin.file: - src: "{{ src_dir }}/joeac.net/http/php" + src: ~{{ ansible_ssh_user }}/src/joeac.net/http/php dest: "{{ http_files_dir }}/php" state: link - name: Symlink html to public directory ansible.builtin.file: - src: "{{ src_dir }}/joeac.net/http/out" + src: ~{{ ansible_ssh_user }}/src/joeac.net/http/out dest: "{{ http_files_dir }}/html" state: link @@ -110,8 +116,8 @@ mode: "600" - name: Install daily crontab to update http - become: false ansible.builtin.cron: special_time: daily name: Update http - job: git -C {{ src_dir }}/joeac.net/http pull; make + job: git -C ~{{ ansible_ssh_user }}/src/joeac.net pull; make -C ~{{ ansible_ssh_user }}/src/joeac.net/http + user: "{{ ansible_ssh_user }}" |
