1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_packages.git synced 2024-08-16 10:19:51 +02:00
ansible_role_packages/tasks/keychain.yml
2021-04-13 16:54:12 +02:00

26 lines
622 B
YAML

---
- name: Update apt cache
become: true
ansible.builtin.apt:
cache_valid_time: 3600
update_cache: true
when:
- ansible_pkg_mgr == "apt"
- name: install keychain to support ssh agent
become: true
ansible.builtin.package:
name: keychain
state: "{{ base__package_state }}"
when:
- ansible_os_family != 'RedHat'
- name: install keychain on centos
become: true
ansible.builtin.yum:
name:
- "{{ _base__keychain_rpm }}"
- libselinux-python
state: "{{ base__package_state }}"
when:
- ansible_os_family == 'RedHat' and ansible_distribution_version | float <= 7