kleinstuff.centos_base
kleinstuff.centos-base
Ansible角色用于配置一些CentOS7基础系统的软件包和规则。这个角色是基于https://github.com/bau-sec/ansible-openvpn-hardened的优秀工作。
要求
需要设置"ansible_centos_base__authorized_keys",至少要有一个ssh密钥,支持多行格式。我想改变这一点,允许你使用一个“安装用户”进行设置,然后添加所有的管理员用户。
角色变量
要配置并由ansible使用的用户
ansible_centos_base__username: centos
默认系统时区
ansible_centos_base__timezone: 'America/Sao_Paulo'
至少一个ssh公钥(可以使用多行格式添加多个密钥)
ansible_centos_base__authorized_key: |
"ssh-rsa...
ssh-rsa..."
基本系统软件包的集合
ansible_centos_base__packages:
- git
- sudo
- vim-enhanced
- which
- yum-plugin-keys
- mlocate
- setroubleshoot-server
- python-firewall
- python-pip
- python-virtualenv
- gnupg
- aide
- openssl
- rsyslog
- logrotate
- yum-cron
安装额外的软件包(在group_vars、host_vars中使用很有用),默认为空。
ansible_centos_base__packages_extra
依赖关系
这个角色没有依赖关系,但请记得阅读上面的“#要求”条目。
示例剧本
- hosts: servers
roles:
- { role: kleinstuff.centos-centos-base }
#待办事项
- 配置使用TravisCI的自动测试
- 允许创建更多用户
- 允许可选的firewalld配置
许可证
GPLv3
作者信息
你可以通过我的项目库在GitHub issues中询问我任何问题。