diff options
author | Christian Franke <nobody@nowhere.ws> | 2015-10-26 20:38:25 +0100 |
---|---|---|
committer | Christian Franke <nobody@nowhere.ws> | 2015-10-26 20:38:25 +0100 |
commit | f38450f9f2037244300082f3e4211b790ac87058 (patch) | |
tree | 074ffa7d0512e099742641df8065d7b4139a6e99 /roles/sublab_web/tasks/as_wikiuser.yaml | |
parent | 4e5034f57b54f1a5052fd859d3419002a477e628 (diff) |
- add hooks between webserver and gitserver:
git->website and wiki->git work now,
git->wiki is still missing,
https://ikiwiki.info/tips/Hosting_Ikiwiki_and_master_git_repository_on_different_machines/
should contain the right info for that
- actually configure repo_service
- replace LDAP auth with dummy password auth for now
Diffstat (limited to 'roles/sublab_web/tasks/as_wikiuser.yaml')
-rw-r--r-- | roles/sublab_web/tasks/as_wikiuser.yaml | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/roles/sublab_web/tasks/as_wikiuser.yaml b/roles/sublab_web/tasks/as_wikiuser.yaml index adfa473..bd30e9d 100644 --- a/roles/sublab_web/tasks/as_wikiuser.yaml +++ b/roles/sublab_web/tasks/as_wikiuser.yaml @@ -22,12 +22,39 @@ src=ikiwiki-editpage.tmpl dest="/home/wiki-{{sublab_web_server_name}}/templates/editpage.tmpl" +- name: Create .ssh dir + file: + path="/home/wiki-{{sublab_web_server_name}}/.ssh" + state=directory + mode=0700 + +# This ssh keypair is authorized to push to the git-server wiki repo +- name: Put ssh pubkey + copy: + dest="/home/wiki-{{sublab_web_server_name}}/.ssh/id_rsa.pub" + content="{{wiki_user_pubkey}}" + mode=0644 + +- name: Put ssh privkey + copy: + dest="/home/wiki-{{sublab_web_server_name}}/.ssh/id_rsa" + content="{{wiki_user_privkey}}" + mode=0600 + +# Configure git +- name: Configure git push for wikiuser + command: git config --global push.default simple +- name: Configure git name + command: git config --global user.name "Wiki User {{ansible_hostname}}" +- name: + command: git config --global user.email "nobody@nowhere.ws" + # Updates to git are pushed automatically and should not # go through ansible - this is for initial deployment only - name: Clone wiki git git: dest="/home/wiki-{{sublab_web_server_name}}/wiki" - repo=git://git.sublab.org/ikiwiki + repo=git+ssh://git@{{groups['gitservers'][0]}}/ikiwiki accept_hostkey=yes update=no notify: Rebuild ikiwiki |