diff options
author | Lars Wirzenius <liw@liw.fi> | 2017-05-08 18:13:21 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2017-05-08 18:13:21 +0300 |
commit | 03bd5be6de02ffebe13d85083b5998d9c5a347f7 (patch) | |
tree | 58d466deb20058b9904e2995f59003b91bd84592 /roles | |
parent | c5943429d6758a18a3af99be5f050ca3ae93bd67 (diff) | |
download | debian-ansible-03bd5be6de02ffebe13d85083b5998d9c5a347f7.tar.gz |
Handle ssh keys as content; restart apache after cgit
Diffstat (limited to 'roles')
-rw-r--r-- | roles/gitano_server/handlers/main.yml | 5 | ||||
-rw-r--r-- | roles/gitano_server/tasks/cgit.yml | 3 | ||||
-rw-r--r-- | roles/gitano_server/tasks/gitano.yml | 6 |
3 files changed, 11 insertions, 3 deletions
diff --git a/roles/gitano_server/handlers/main.yml b/roles/gitano_server/handlers/main.yml new file mode 100644 index 0000000..33b5c8f --- /dev/null +++ b/roles/gitano_server/handlers/main.yml @@ -0,0 +1,5 @@ +- name: restart apache2 + systemd: + name: apache2 + state: restarted + enabled: yes diff --git a/roles/gitano_server/tasks/cgit.yml b/roles/gitano_server/tasks/cgit.yml index fff0d93..ff0375a 100644 --- a/roles/gitano_server/tasks/cgit.yml +++ b/roles/gitano_server/tasks/cgit.yml @@ -35,6 +35,7 @@ group: root mode: 0755 with_items: "{{ cgit_hosts }}" + notify: restart apache2 - name: install apache virtualhosts template: @@ -44,7 +45,9 @@ group: root mode: 0755 with_items: "{{ cgit_hosts }}" + notify: restart apache2 - name: enable virtualhosts shell: "a2ensite {{ item }}" with_items: "{{ cgit_hosts }}" + notify: restart apache2 diff --git a/roles/gitano_server/tasks/gitano.yml b/roles/gitano_server/tasks/gitano.yml index 7d7b4fb..d9b091d 100644 --- a/roles/gitano_server/tasks/gitano.yml +++ b/roles/gitano_server/tasks/gitano.yml @@ -11,11 +11,11 @@ authorized_key: user: git state: present - key: "{{ lookup('file', gitano_bypass_pub) }}" + key: "{{ gitano_bypass_pub }}" - name: copy over gitano admin public key copy: - src: "{{ gitano_admin_pub }}" + content: "{{ gitano_admin_pub }}" dest: /home/git/admin.pub owner: git group: git @@ -23,7 +23,7 @@ - name: copy over gitano bypass public key copy: - src: "{{ gitano_bypass_pub }}" + content: "{{ gitano_bypass_pub }}" dest: /home/git/bypass.pub owner: git group: git |