mirror of
https://github.com/roles-ansible/ansible_role_weechat.git
synced 2024-08-16 13:09:48 +02:00
imporve config
This commit is contained in:
parent
eaa4a63cae
commit
fbfeeec69e
4 changed files with 15 additions and 7 deletions
|
@ -23,6 +23,8 @@ weechat:
|
|||
private_repo: false
|
||||
# generate ssh key pair (if not available)
|
||||
gen_ssh_key_pair: true
|
||||
# the tag, commit or branch we should check out
|
||||
version: 'main'
|
||||
|
||||
# version check for this role? (true is recomended)
|
||||
submodules_versioncheck: false
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
---
|
||||
- name: create ssh key pair (if needed)
|
||||
become_user: "{{ weechat.user }}"
|
||||
become: true
|
||||
community.cryptop.openssh_keypair:
|
||||
community.crypto.openssh_keypair:
|
||||
path: "{{ weechat.home_directory }}/.ssh/id_ed25519"
|
||||
type: ed25519
|
||||
owner: "{{ weechat.user }}"
|
||||
|
@ -34,16 +33,16 @@
|
|||
- ssh_key_pair.changed
|
||||
|
||||
- name: clone or update private git repository
|
||||
become_user: "{{ weechat.user }}"
|
||||
become: true
|
||||
block:
|
||||
- name: try to download/update git repo
|
||||
ansible.builtin.git:
|
||||
repo: "{{ weechat.custom_config.private_repo }}"
|
||||
dest: "{{ weechat.home_directory }}/.weechat"
|
||||
version: master
|
||||
version: "{{ weechat.custom_config.version | default ('main') }}"
|
||||
accept_hostkey: true
|
||||
update: true
|
||||
ssh_opts: "-i {{ weechat.home_directory }}/.ssh/id_ed25519"
|
||||
rescue:
|
||||
- name: wait until you fixed remote git issues
|
||||
pause:
|
||||
|
@ -56,4 +55,13 @@
|
|||
version: master
|
||||
accept_hostkey: true
|
||||
update: true
|
||||
ssh_opts: "-i {{ weechat.home_directory }}/.ssh/id_ed25519"
|
||||
when: not weechat.custom_config.private_repo | bool
|
||||
|
||||
- name: "change git repo ownwe to {{ weechat.user }}"
|
||||
become: true
|
||||
ansible.builtin.file:
|
||||
path: "{{ weechat.home_directory }}/.weechat"
|
||||
recurse: true
|
||||
owner: "{{ weechat.user }}"
|
||||
when: not weechat.custom_config.private_repo | bool
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
---
|
||||
- name: create weechat directory
|
||||
become: true
|
||||
become_user: "{{ weechat.user }}"
|
||||
file:
|
||||
path: "{{ weechat.home_directory }}/.weechat"
|
||||
state: directory
|
||||
|
@ -10,7 +9,6 @@
|
|||
|
||||
- name: create weechat plugins directory
|
||||
become: true
|
||||
become_user: "{{ weechat.user }}"
|
||||
file:
|
||||
path: "{{ weechat.home_directory }}/.weechat/{{ item.value }}/autoload"
|
||||
state: directory
|
||||
|
|
|
@ -9,7 +9,7 @@ weechat_plugin_languages:
|
|||
lua: lua
|
||||
|
||||
# version management
|
||||
playbook_version_number: 4199 # should be over ninethousand
|
||||
playbook_version_number: 4200 # should be over ninethousand
|
||||
playbook_version_path: 'role-weechat_roles-ansible_github.com.version'
|
||||
|
||||
# default values
|
||||
|
|
Loading…
Reference in a new issue