1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_packages.git synced 2024-08-16 10:19:51 +02:00

Merge pull request #4 from roles-ansible/new

Expand funktionallity, improved vars and added keychain
This commit is contained in:
L3D 2020-11-11 11:43:49 +01:00 committed by GitHub
commit dcd338825b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 39 additions and 2 deletions

View file

@ -38,6 +38,12 @@ base__package_state: 'present'
# should we update all packages? # should we update all packages?
base__upgrade_packages_to_latest_version: false base__upgrade_packages_to_latest_version: false
# install keychain (ssh agent)
base__install_keychain: true
# install vim (comand line editor)
base__install_vim: true
# perform a simple versions check (true is recomended) # perform a simple versions check (true is recomended)
submodules_versioncheck: false submodules_versioncheck: false
``` ```

View file

@ -20,6 +20,16 @@ base__package_state: 'present'
# should we update all packages? # should we update all packages?
base__upgrade_packages_to_latest_version: "{{ upgrade_packages_to_latest_version }}" base__upgrade_packages_to_latest_version: "{{ upgrade_packages_to_latest_version }}"
# install keycain to have a awesome ssh agent
base__install_keychain: true
# install vim as awesome command line editor
base__install_vim: "{{ editor_is_vim }}"
# directlink to keychain becaus RHEL do not provide it...
_base__keychain_rpm: 'http://packages.psychotic.ninja/7/base/x86_64/RPMS//keychain-2.8.0-3.el7.psychotic.noarch.rpm'
# LEGACY VARS # LEGACY VARS
# ++ WILL BE REMOVED SOON ++ # ++ WILL BE REMOVED SOON ++
# add eth zurich apt source # add eth zurich apt source

18
tasks/keychain.yml Normal file
View file

@ -0,0 +1,18 @@
---
- name: install keychain to support ssh agent
become: yes
package:
name: keychain
state: "{{ base__package_state }}"
when:
- ansible_os_family != 'RedHat'
- name: install keychain on centos
become: yes
yum:
name:
- "{{ _base__keychain_rpm }}"
- libselinux-python
state: "{{ base__package_state }}"
when:
- ansible_os_family == 'RedHat' and ansible_distribution_version | float <= 7

View file

@ -22,4 +22,7 @@
- base__upgrade_packages_to_latest_version|bool - base__upgrade_packages_to_latest_version|bool
- include_tasks: editor.yml - include_tasks: editor.yml
when: editor_is_vim | bool when: base__install_vim | bool
- include_tasks: keychain.yml
when: base__install_keychain | bool

View file

@ -59,5 +59,5 @@ base__linux_packages:
- asciinema - asciinema
- youtube-dl - youtube-dl
playbook_version_number: 9004 # should be over ninethousand playbook_version_number: 9005 # should be over ninethousand
playbook_version_path: 'base-packages_roles-ansible_github.version' playbook_version_path: 'base-packages_roles-ansible_github.version'