ansible-role-redhat_localrepo
Your Red Hat subscription should have rhel-7-server-rpms and rhel-server-rhscl-7-eus-rpms available for installing Ansible and nginx.
The role variables below are default. You can change any of them according your requirements.
redhat_localrepo:
# Red Hat Portal username
rhn_username: "{{ lookup('env', 'RHN_USERNAME') }}"
# Red Hat Portal password
rhn_password: "{{ lookup('env', 'RHN_PASSWORD') }}"
# Whether or not to autosubscibe to available repositories.
autosubscribe: true
# repositories to mirror
repos:
- "rhel-7-server-rpms"
- "rhel-7-server-extras-rpms"
# root directory for storing packages
web_root_dir: '/var/www/html'
# port to listen
web_server_port: 80
# execution time of daily cron job
daily_sync_hour: 22
daily_sync_minute: 0
None
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: ansible-role-redhat_localrepo }
MIT
Leon Tseng