Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gaol/ansible-role-package
Ansible Role to install packages
https://github.com/gaol/ansible-role-package
Last synced: 19 days ago
JSON representation
Ansible Role to install packages
- Host: GitHub
- URL: https://github.com/gaol/ansible-role-package
- Owner: gaol
- License: apache-2.0
- Created: 2017-12-26T02:56:17.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-02-06T03:17:57.000Z (almost 7 years ago)
- Last Synced: 2024-11-01T04:11:36.461Z (2 months ago)
- Language: Shell
- Homepage: https://galaxy.ansible.com/gaol/package
- Size: 13.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ansible-role-package
This Ansible role has very simple goal to just install defined packages
In most common cases, only one variable needs to be defined:
desired_packages:
- java-1.8.0-openjdk-devel
- maven
- dockerThen this role will just install the packages defined above.
In RPM based package manager, `some-yum.repo` may need to be installed first, and also some rpm keys, then the following variables can be defined:
yum_repo_urls:
- https://pkg.jenkins.io/redhat/jenkins.repo
yum_repo_key_urls:
- https://pkg.jenkins.io/redhat/jenkins.io.keyIn Fedora and CentOS, `epel-release` is a special package which needs to be installed before some other packages can be installed, such packages can be defined in:
pre_packages:
- epel-releaseIn many cases, some services need to be started after package installation, just define them in:
started_services:
- docker### Full Examples:
---
- hosts: all
become: yes
become_user: root
vars:
yum_repo_urls:
- https://pkg.jenkins.io/redhat/jenkins.repo
yum_repo_key_urls:
- https://pkg.jenkins.io/redhat/jenkins.io.key
pre_packages:
- epel-release
pre_services: []
scripts_after_pre_services:
- dummy_1.sh
desired_packages:
- java-1.8.0-openjdk-devel
- maven
- docker
configs_after_install:
- src: "{{ playbook_dir }}/local"
dest: "/tmp/gaol.package.test"
started_services:
- docker
scripts_after_services_started:
- dummy_2.sh
roles:
- gaol.package