Skip to content
Snippets Groups Projects
Commit 3af1d3d0 authored by Jens Steidl's avatar Jens Steidl :baby_chick:
Browse files

fix: repairs autocomplete based on aliases, adds .bash-profile files

parent 7f841cc6
No related branches found
No related tags found
No related merge requests found
Pipeline #3525 passed
...@@ -28,6 +28,20 @@ ...@@ -28,6 +28,20 @@
block: | block: |
cd ~ cd ~
# Bash-Completion funktioniert ab 2020.2 anders, s. Abschnitt AUTOCOMPLETION in perldoc bin/subapp_rosetta.pl und bin/disapp_rosetta.pl
- name: configure .bash-profile for DisApp user
ansible.builtin.blockinfile:
path: "/home/{{ vault_disapp_user }}/.bash-profile"
  • Warum soll das in $HOME/.bash_profile? Dafür gibt es /etc/bash_profile

  • Please register or sign in to reply
backup: "no"
create: "yes"
owner: "{{ vault_disapp_user }}"
group: "{{ vault_disapp_group }}"
mode: "0644"
marker: "# {mark} ANSIBLE MANAGED BLOCK - DisApp-specific"
state: present
block: |
complete -C disapp disapp
- name: configure .bashrc for SubApp user - name: configure .bashrc for SubApp user
ansible.builtin.blockinfile: ansible.builtin.blockinfile:
path: "/home/{{ vault_subapp_user }}/.bashrc" path: "/home/{{ vault_subapp_user }}/.bashrc"
...@@ -66,6 +80,20 @@ ...@@ -66,6 +80,20 @@
cd ~ cd ~
# Bash-Completion funktioniert ab 2020.2 anders, s. Abschnitt AUTOCOMPLETION in perldoc bin/subapp_rosetta.pl und bin/disapp_rosetta.pl
- name: configure .bash-profile for SubApp user
ansible.builtin.blockinfile:
path: "/home/{{ vault_subapp_user }}/.bash-profile"
  • Warum soll das in $HOME/.bash_profile? Dafür gibt es /etc/bash_profile

  • Author Owner

    Nur bei diesen Nutzern soll die App eigentlich genutzt und auch nur dort die Nutzung durch autocomplete erleichtert werden. Weiterhin, nur diese Nutzer haben den jeweiligen Alias für den App Aufruf.

    Edited by Jens Steidl
  • Please register or sign in to reply
backup: "no"
create: "yes"
owner: "{{ vault_subapp_user }}"
group: "{{ vault_subapp_group }}"
mode: "0644"
marker: "# {mark} ANSIBLE MANAGED BLOCK - SubApp-specific"
state: present
block: |
complete -C subapp subapp
- name: Add aliases for DisApp user - name: Add aliases for DisApp user
ansible.builtin.blockinfile: ansible.builtin.blockinfile:
path: "/home/{{ vault_disapp_user }}/.bash_aliases" path: "/home/{{ vault_disapp_user }}/.bash_aliases"
......
...@@ -220,18 +220,6 @@ ...@@ -220,18 +220,6 @@
owner: "{{ vault_subapp_user }}" owner: "{{ vault_subapp_user }}"
group: "{{ vault_subapp_group }}" group: "{{ vault_subapp_group }}"
# Bash-Completion funktioniert ab 2020.2 anders, s. Abschnitt AUTOCOMPLETION in perldoc bin/subapp_rosetta.pl und bin/disapp_rosetta.pl
# https://ansible-lint.readthedocs.io/en/latest/usage/#false-positives-skipping-rules
- name: Bash-Completion aktivieren # noqa command-instead-of-shell
ansible.builtin.shell:
chdir: "/usr/local/bin/"
cmd: "{{ item }}"
executable: "/usr/bin/bash" # Yup, this REALLY needs a Bash, so we HAVE to use ansible.builtin.shell, so don't show linter errors
loop:
- "complete -C subapp_rosetta.pl subapp_rosetta.pl"
- "complete -C disapp_rosetta.pl disapp_rosetta.pl"
changed_when: false
- name: alte Bash-Completion entfernen - name: alte Bash-Completion entfernen
ansible.builtin.file: ansible.builtin.file:
path: "/home/{{ vault_subapp_user }}/.bash_completion" path: "/home/{{ vault_subapp_user }}/.bash_completion"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment