add initial base_packages role; formatting fix for roles/etc_hosts/defaults/main.yml
This commit is contained in:
parent
d9e386f5a5
commit
03e505837d
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
roles/*
|
||||
!roles/.keep
|
||||
!roles/etc_hosts
|
||||
!roles/base_packages
|
||||
|
38
roles/base_packages/README.md
Normal file
38
roles/base_packages/README.md
Normal file
@ -0,0 +1,38 @@
|
||||
Role Name
|
||||
=========
|
||||
|
||||
A brief description of the role goes here.
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.
|
||||
|
||||
Role Variables
|
||||
--------------
|
||||
|
||||
A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
|
||||
A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.
|
||||
|
||||
Example Playbook
|
||||
----------------
|
||||
|
||||
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
|
||||
|
||||
- hosts: servers
|
||||
roles:
|
||||
- { role: username.rolename, x: 42 }
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
BSD
|
||||
|
||||
Author Information
|
||||
------------------
|
||||
|
||||
An optional section for the role authors to include contact information, or a website (HTML is not allowed).
|
10
roles/base_packages/defaults/main.yml
Normal file
10
roles/base_packages/defaults/main.yml
Normal file
@ -0,0 +1,10 @@
|
||||
---
|
||||
__project_author : Chris Hammer
|
||||
__project_email : chris@thezengarden.net
|
||||
__project_repo : https://github.com/jchristianh-ansible-collections/baseos
|
||||
|
||||
|
||||
__template_header : The Zen Garden
|
||||
|
||||
|
||||
...
|
0
roles/base_packages/files/.keep
Normal file
0
roles/base_packages/files/.keep
Normal file
2
roles/base_packages/handlers/main.yml
Normal file
2
roles/base_packages/handlers/main.yml
Normal file
@ -0,0 +1,2 @@
|
||||
---
|
||||
# handlers file for base_packages
|
52
roles/base_packages/meta/main.yml
Normal file
52
roles/base_packages/meta/main.yml
Normal file
@ -0,0 +1,52 @@
|
||||
galaxy_info:
|
||||
author: your name
|
||||
description: your role description
|
||||
company: your company (optional)
|
||||
|
||||
# If the issue tracker for your role is not on github, uncomment the
|
||||
# next line and provide a value
|
||||
# issue_tracker_url: http://example.com/issue/tracker
|
||||
|
||||
# Choose a valid license ID from https://spdx.org - some suggested licenses:
|
||||
# - BSD-3-Clause (default)
|
||||
# - MIT
|
||||
# - GPL-2.0-or-later
|
||||
# - GPL-3.0-only
|
||||
# - Apache-2.0
|
||||
# - CC-BY-4.0
|
||||
license: license (GPL-2.0-or-later, MIT, etc)
|
||||
|
||||
min_ansible_version: 2.1
|
||||
|
||||
# If this a Container Enabled role, provide the minimum Ansible Container version.
|
||||
# min_ansible_container_version:
|
||||
|
||||
#
|
||||
# Provide a list of supported platforms, and for each platform a list of versions.
|
||||
# If you don't wish to enumerate all versions for a particular platform, use 'all'.
|
||||
# To view available platforms and versions (or releases), visit:
|
||||
# https://galaxy.ansible.com/api/v1/platforms/
|
||||
#
|
||||
# platforms:
|
||||
# - name: Fedora
|
||||
# versions:
|
||||
# - all
|
||||
# - 25
|
||||
# - name: SomePlatform
|
||||
# versions:
|
||||
# - all
|
||||
# - 1.0
|
||||
# - 7
|
||||
# - 99.99
|
||||
|
||||
galaxy_tags: []
|
||||
# List tags for your role here, one per line. A tag is a keyword that describes
|
||||
# and categorizes the role. Users find roles by searching for tags. Be sure to
|
||||
# remove the '[]' above, if you add tags to this list.
|
||||
#
|
||||
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
|
||||
# Maximum 20 tags per role.
|
||||
|
||||
dependencies: []
|
||||
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
|
||||
# if you add dependencies to this list.
|
20
roles/base_packages/tasks/main.yml
Normal file
20
roles/base_packages/tasks/main.yml
Normal file
@ -0,0 +1,20 @@
|
||||
---
|
||||
- name: Include distribution specific variables or include sane defaults
|
||||
block:
|
||||
- name: Include distribution specific variables
|
||||
include_vars:
|
||||
file: "{{ ansible_distribution | lower }}_{{ ansible_distribution_major_version }}.yml"
|
||||
|
||||
rescue:
|
||||
- name: Distribution not supported; including sane defaults...
|
||||
include_vars:
|
||||
file: __default_packages.yml
|
||||
|
||||
|
||||
- name: "Install base packages for host"
|
||||
package:
|
||||
name : "{{ __base_packages }}"
|
||||
state : present
|
||||
|
||||
|
||||
...
|
0
roles/base_packages/templates/.keep
Normal file
0
roles/base_packages/templates/.keep
Normal file
2
roles/base_packages/tests/inventory
Normal file
2
roles/base_packages/tests/inventory
Normal file
@ -0,0 +1,2 @@
|
||||
localhost
|
||||
|
5
roles/base_packages/tests/test.yml
Normal file
5
roles/base_packages/tests/test.yml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
- hosts: localhost
|
||||
remote_user: root
|
||||
roles:
|
||||
- base_packages
|
29
roles/base_packages/vars/__default_packages.yml
Normal file
29
roles/base_packages/vars/__default_packages.yml
Normal file
@ -0,0 +1,29 @@
|
||||
---
|
||||
# These defaults will cover CentOS 7, 8, 9, and Debian 10 and 11
|
||||
# ...of which we already have vars files for. Although intended,
|
||||
# they may not actually match an unsupported distribution.
|
||||
|
||||
__base_packages:
|
||||
- bc
|
||||
- bzip2
|
||||
- file
|
||||
- ftp
|
||||
- git
|
||||
- htop
|
||||
- iptraf
|
||||
- mlocate
|
||||
- lsof
|
||||
- rsync
|
||||
- screen
|
||||
- sudo
|
||||
- tar
|
||||
- tcpdump
|
||||
- telnet
|
||||
- traceroute
|
||||
- tree
|
||||
- unzip
|
||||
- vnstat
|
||||
- wget
|
||||
- whois
|
||||
- zip
|
||||
|
39
roles/base_packages/vars/centos_7.yml
Normal file
39
roles/base_packages/vars/centos_7.yml
Normal file
@ -0,0 +1,39 @@
|
||||
---
|
||||
__base_packages:
|
||||
- bc
|
||||
- bind-utils
|
||||
- bzip2
|
||||
- cronie
|
||||
- deltarpm
|
||||
- file
|
||||
- ftp
|
||||
- git
|
||||
- htop
|
||||
- ipa-client
|
||||
- iperf
|
||||
- iptraf
|
||||
- jwhois
|
||||
- lsof
|
||||
- man
|
||||
- mlocate
|
||||
- net-snmp
|
||||
- net-tools
|
||||
- nfs-utils
|
||||
- ntp
|
||||
- rsync
|
||||
- screen
|
||||
- sudo
|
||||
- tar
|
||||
- tcpdump
|
||||
- telnet
|
||||
- traceroute
|
||||
- tree
|
||||
- unzip
|
||||
- vim-enhanced
|
||||
- vnstat
|
||||
- wget
|
||||
- yum-utils
|
||||
- zip
|
||||
|
||||
|
||||
...
|
40
roles/base_packages/vars/centos_8.yml
Normal file
40
roles/base_packages/vars/centos_8.yml
Normal file
@ -0,0 +1,40 @@
|
||||
---
|
||||
__base_packages:
|
||||
- bc
|
||||
- bind-utils
|
||||
- bzip2
|
||||
- chrony
|
||||
- cronie
|
||||
- drpm
|
||||
- file
|
||||
- ftp
|
||||
- git
|
||||
- htop
|
||||
- ipa-client
|
||||
- iperf3
|
||||
- iptraf
|
||||
- lsof
|
||||
- man
|
||||
- mlocate
|
||||
- net-snmp
|
||||
- net-tools
|
||||
- nfs-utils
|
||||
- rsync
|
||||
- rsyslog
|
||||
- screen
|
||||
- sudo
|
||||
- tar
|
||||
- tcpdump
|
||||
- telnet
|
||||
- traceroute
|
||||
- tree
|
||||
- unzip
|
||||
- vim-enhanced
|
||||
- vnstat
|
||||
- wget
|
||||
- whois
|
||||
- yum-utils
|
||||
- zip
|
||||
|
||||
|
||||
...
|
39
roles/base_packages/vars/centos_9.yml
Normal file
39
roles/base_packages/vars/centos_9.yml
Normal file
@ -0,0 +1,39 @@
|
||||
---
|
||||
__base_packages:
|
||||
- bc
|
||||
- bind-utils
|
||||
- bzip2
|
||||
- chrony
|
||||
- cronie
|
||||
- file
|
||||
- ftp
|
||||
- git
|
||||
- htop
|
||||
- ipa-client
|
||||
- iperf3
|
||||
- iptraf
|
||||
- lsof
|
||||
- man
|
||||
- mlocate
|
||||
- net-snmp
|
||||
- net-tools
|
||||
- nfs-utils
|
||||
- rsync
|
||||
- rsyslog
|
||||
- screen
|
||||
- sudo
|
||||
- tar
|
||||
- tcpdump
|
||||
- telnet
|
||||
- traceroute
|
||||
- tree
|
||||
- unzip
|
||||
- vim-enhanced
|
||||
- vnstat
|
||||
- wget
|
||||
- whois
|
||||
- yum-utils
|
||||
- zip
|
||||
|
||||
|
||||
...
|
36
roles/base_packages/vars/debian_11.yml
Normal file
36
roles/base_packages/vars/debian_11.yml
Normal file
@ -0,0 +1,36 @@
|
||||
---
|
||||
__base_packages:
|
||||
- bc
|
||||
- bind9utils
|
||||
- bzip2
|
||||
- cron
|
||||
- file
|
||||
- ftp
|
||||
- git
|
||||
- htop
|
||||
- iperf
|
||||
- iptraf
|
||||
- lsof
|
||||
- man-db
|
||||
- mlocate
|
||||
- nfs-common
|
||||
- ntp
|
||||
- procps
|
||||
- rsync
|
||||
- screen
|
||||
- snmpd
|
||||
- sudo
|
||||
- tar
|
||||
- tcpdump
|
||||
- telnet
|
||||
- traceroute
|
||||
- tree
|
||||
- unzip
|
||||
- vim
|
||||
- vnstat
|
||||
- wget
|
||||
- whois
|
||||
- zip
|
||||
|
||||
|
||||
...
|
2
roles/base_packages/vars/main.yml
Normal file
2
roles/base_packages/vars/main.yml
Normal file
@ -0,0 +1,2 @@
|
||||
---
|
||||
# vars file for base_packages
|
@ -11,3 +11,6 @@ __etc_hosts_file : /etc/hosts
|
||||
__etc_hosts_file_docker : /etc/hosts.docker
|
||||
__etc_hosts_version : 1.0.0
|
||||
__etc_hosts_revision : 22314
|
||||
|
||||
|
||||
...
|
||||
|
Loading…
x
Reference in New Issue
Block a user