1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_weechat.git synced 2024-08-16 13:09:48 +02:00

Add repo checkout

This commit is contained in:
L3D 2020-03-12 23:03:29 +01:00
parent d8b52131c0
commit 15abdf974c
Signed by: l3d
GPG key ID: CD08445BFF4313D1
5 changed files with 13 additions and 13 deletions

View file

@ -65,10 +65,9 @@ weechat:
```yaml
weechat:
home_directory: "{{ ansible_env.HOME | default('/home/{{ weechat.user }}') }}/.weechat"
home_directory: "{{ ansible_env.HOME | default('/home/{{ weechat.user }}') }}"
```
+ the path where the weechat home is located. If the variable ``{{ ansible_env.HOME }}`` is not set it will use ``"/home/{{ weechat.user }}"`` as fallback.
+ it points in the ``.weechat`` directory of your home.
```yaml
weechat:
@ -82,7 +81,7 @@ weechat:
private_repo: false
```
+ The path to your git repo with your personal weechat config.
+ This role clones the repo to the ``{{ weechat.home_directory }}`` destination. *(Also known al your local .weechat directory.)* It will fail if you already have files and/or folders in your local .weechat dorectory.
+ This role clones the repo to the ``"{{ weechat.home_directory }}/.weechat"`` directory. *(Also known al your local .weechat directory.)* It will fail if you already have files and/or folders in your local .weechat dorectory.
+ You have to add, commit and push the local changes in your local .weechat folder manually. Please be aware that it is a good idea to disable your log or at least add the weechatlog folder to your .gitignore file in your personal weechat config.
```yaml
@ -90,7 +89,7 @@ weechat:
custom_config:
gen_ssh_key_pair: true
```
+ ``weechat.custom_config.gen_ssh_key_pair: true``: We will generate a eleptic curve ssh key *(if it not already exist at ``"{{ weechat.home_directory }}/../.ssh/id_ed25519"``)* and print the public key to the prompt. This will give you the time to add this public key to your private git repo for your own weechat config as deploy key. This is required to download your private repo withour username/password. This requires that you set ``{{ weechat.custom_config.private_repo }}`` to the ssh accessable version of your git repo.
+ ``weechat.custom_config.gen_ssh_key_pair: true``: We will generate a eleptic curve ssh key *(if it not already exist at ``"{{ weechat.home_directory }}/.ssh/id_ed25519"``)* and print the public key to the prompt. This will give you the time to add this public key to your private git repo for your own weechat config as deploy key. This is required to download your private repo withour username/password. This requires that you set ``{{ weechat.custom_config.private_repo }}`` to the ssh accessable version of your git repo.
+ ``weechat.custom_config.gen_ssh_key_pair: false``: We do not manage access to the git repo with your weechat config.
```txt

View file

@ -11,7 +11,7 @@ weechat:
# user to install and use weechat
user: "{{ ansible_user_id }}"
# where is our home direcotory for weechat
home_directory: "{{ ansible_env.HOME | default('/home/{{ weechat.user }}') }}/.weechat"
home_directory: "{{ ansible_env.HOME | default('/home/{{ weechat.user }}') }}"
# plugins we want
plugins: []
# weechat gpg key for debian/ubuntu repo

View file

@ -3,7 +3,7 @@
become_user: "{{ weechat.user }}"
become: true
openssh_keypair:
path: "{{ weechat.home_directory }}/../.ssh/id_ed25519"
path: "{{ weechat.home_directory }}/.ssh/id_ed25519"
type: ed25519
owner: "{{ weechat.user }}"
register: ssh_key_pair
@ -38,6 +38,7 @@
become: true
git:
repo: "{{ weechat.custom_config.private_repo }}"
dest: "{{ weechat.home_directory }}"
dest: "{{ weechat.home_directory }}/.weechat"
version: master
accept_hostkey: yes
when: not weechat.custom_config.private_repo | bool

View file

@ -3,7 +3,7 @@
become: true
become_user: "{{ weechat.user }}"
file:
path: "{{ weechat.home_directory }}"
path: "{{ weechat.home_directory }}/.weechat"
state: directory
owner: "{{ weechat.user }}"
mode: "0750"
@ -12,7 +12,7 @@
become: true
become_user: "{{ weechat.user }}"
file:
path: "{{ weechat.home_directory }}/{{ item.value }}/autoload"
path: "{{ weechat.home_directory }}/.weechat/{{ item.value }}/autoload"
state: directory
owner: "{{ weechat.user }}"
mode: "0750"
@ -21,12 +21,12 @@
- name: download weechat plugins
get_url:
url: 'https://weechat.org/files/scripts/{{ item }}'
dest: "{{ weechat.home_directory }}/{{ weechat_plugin_languages[item.split('.',1)[-1]] }}/{{ item }}"
dest: "{{ weechat.home_directory }}/.weechat/{{ weechat_plugin_languages[item.split('.',1)[-1]] }}/{{ item }}"
with_items: '{{ weechat.plugins }}'
- name: symlinking plugins to autoload
file:
src: "{{ weechat.home_directory }}/{{ weechat_plugin_languages[item.split('.',1)[-1]] }}/{{ item }}"
dest: "{{ weechat.home_directory }}/{{ weechat_plugin_languages[item.split('.',1)[-1]] }}/autoload/{{ item }}"
src: "{{ weechat.home_directory }}/.weechat/{{ weechat_plugin_languages[item.split('.',1)[-1]] }}/{{ item }}"
dest: "{{ weechat.home_directory }}/.weechat/{{ weechat_plugin_languages[item.split('.',1)[-1]] }}/autoload/{{ item }}"
state: link
with_items: '{{ weechat.plugins }}'

View file

@ -18,7 +18,7 @@ _weechat:
autostart: false
install_plugins: false
user: "{{ ansible_user_id }}"
home_directory: "{{ ansible_env.HOME | default('/home/{{ weechat.user }}') }}/.weechat"
home_directory: "{{ ansible_env.HOME | default('/home/{{ weechat.user }}') }}"
plugins: []
gpg_id: '11E9DE8848F2B65222AA75B8D1820DB22A11534E'
use_custom_config: false