From e42d3c82146f9c345d327152a2c32a3374911de2 Mon Sep 17 00:00:00 2001 From: Aaron Guise Date: Thu, 30 Sep 2021 22:55:46 +1300 Subject: [PATCH] Updated defaults prefix with common_ --- defaults/main.yml | 19 ++-- meta/main.yml | 153 +++++------------------------ templates/etc.hosts.j2 | 2 +- templates/etc.resolv.conf.j2 | 4 +- templates/etc.sysconfig.network.j2 | 2 +- 5 files changed, 37 insertions(+), 143 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 9fe6d13..60fd02e 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,11 +1,11 @@ --- # defaults file for guisea.common -domain: exampledomain.com +common_domain: exampledomain.com ad_domain_joined: no -win_timezone: New Zealand Standard Time +common_win_timezone: New Zealand Standard Time vendors_hosts: [] -dns_servers: +common_dns_servers: - 1.0.0.1 - 1.1.1.1 @@ -13,11 +13,10 @@ ADMIN_GROUP: admins common_grub_timeout: 5 -postfix_configure: false +common_postfix_configure: false +common_postfix_relayhost: some.smtp.server common_packages: - - libselinux-python - - MySQL-python - nano - git - htop @@ -27,12 +26,14 @@ common_packages: - yum-utils - unzip -win_packages: +common_win_packages: - notepadplusplus.install - firefoxesr - baretail - 7zip.install -apply_win_updates: false +common_apply_win_updates: false -common_show_ipv6: false|bool \ No newline at end of file +common_show_ipv6: false +common_root_pwd: $6$5GG7U/EyDL$L/UkIlhoVABnvjtJl0zGwryjgRF9wNZ5wIAIAVfViROiMUK0tUsuZmO.x87tpDYUJA0QR5pCo4yd.2sLgSlHU0 +common_root_email: anemail@someco.com \ No newline at end of file diff --git a/meta/main.yml b/meta/main.yml index 078345f..523d703 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -1,131 +1,28 @@ --- galaxy_info: - author: your name + author: Aaron Guise + namespace: cybercinch + role_name: ansible_role_common 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 - # Some suggested licenses: - # - BSD (default) - # - MIT - # - GPLv2 - # - GPLv3 - # - Apache - # - CC-BY - license: license (GPLv2, CC-BY, etc) - min_ansible_version: 1.2 - # - # Below are all platforms currently available. Just uncomment - # the ones that apply to your role. If you don't see your - # platform on this list, let us know and we'll get it added! - # - #platforms: - #- name: EL - # versions: - # - all - # - 5 - # - 6 - # - 7 - #- name: GenericUNIX - # versions: - # - all - # - any - #- name: Solaris - # versions: - # - all - # - 10 - # - 11.0 - # - 11.1 - # - 11.2 - # - 11.3 - #- name: Fedora - # versions: - # - all - # - 16 - # - 17 - # - 18 - # - 19 - # - 20 - # - 21 - # - 22 - # - 23 - #- name: Windows - # versions: - # - all - # - 2012R2 - #- name: SmartOS - # versions: - # - all - # - any - #- name: opensuse - # versions: - # - all - # - 12.1 - # - 12.2 - # - 12.3 - # - 13.1 - # - 13.2 - #- name: Amazon - # versions: - # - all - # - 2013.03 - # - 2013.09 - #- name: GenericBSD - # versions: - # - all - # - any - #- name: FreeBSD - # versions: - # - all - # - 10.0 - # - 10.1 - # - 10.2 - # - 8.0 - # - 8.1 - # - 8.2 - # - 8.3 - # - 8.4 - # - 9.0 - # - 9.1 - # - 9.1 - # - 9.2 - # - 9.3 - #- name: Ubuntu - # versions: - # - all - # - lucid - # - maverick - # - natty - # - oneiric - # - precise - # - quantal - # - raring - # - saucy - # - trusty - # - utopic - # - vivid - #- name: SLES - # versions: - # - all - # - 10SP3 - # - 10SP4 - # - 11 - # - 11SP1 - # - 11SP2 - # - 11SP3 - #- name: GenericLinux - # versions: - # - all - # - any - #- name: Debian - # versions: - # - all - # - etch - # - jessie - # - lenny - # - squeeze - # - wheezy + license: MIT + min_ansible_version: 2.9 + + platforms: + - name: EL + versions: + - all + - name: Windows + versions: + - all + - name: Amazon + versions: + - all + - name: Ubuntu + versions: + - all + - name: Debian + versions: + - all # # Below are all categories currently available. Just as with # the platforms above, uncomment those that apply to your role. @@ -145,8 +42,4 @@ galaxy_info: #- packaging #- system #- web -dependencies: [] - # List your role dependencies here, one per line. - # Be sure to remove the '[]' above if you add dependencies - # to this list. - +dependencies: [] diff --git a/templates/etc.hosts.j2 b/templates/etc.hosts.j2 index 8775168..7f71555 100644 --- a/templates/etc.hosts.j2 +++ b/templates/etc.hosts.j2 @@ -4,7 +4,7 @@ 127.0.0.1 localhost {{ ansible_hostname }} ::1 localhost {{ ansible_hostname }} -{{ ansible_default_ipv4.address }} {{ ansible_hostname }}.{{ domain }} {{ ansible_hostname }} +{{ ansible_default_ipv4.address }} {{ ansible_hostname }}.{{ common_domain }} {{ ansible_hostname }} {# note: below block takes a list of ip -> name mappings applying them to the hosts file should the variable be diff --git a/templates/etc.resolv.conf.j2 b/templates/etc.resolv.conf.j2 index 9c9c458..f1438ee 100644 --- a/templates/etc.resolv.conf.j2 +++ b/templates/etc.resolv.conf.j2 @@ -2,9 +2,9 @@ ## DO NOT edit manually as changes will be overwritten ## # Search Domain -search {{ domain }} +search {{ common_domain }} # Use servers configured via Ansible -{% for server in dns_servers %} +{% for server in common_dns_servers %} nameserver {{ server }} {% endfor %} \ No newline at end of file diff --git a/templates/etc.sysconfig.network.j2 b/templates/etc.sysconfig.network.j2 index 6316e14..9192026 100644 --- a/templates/etc.sysconfig.network.j2 +++ b/templates/etc.sysconfig.network.j2 @@ -2,4 +2,4 @@ ## DO NOT edit manually as changes will be overwritten ## NETWORKING=yes -HOSTNAME={{ inventory_hostname }}.{{ domain }} +HOSTNAME={{ inventory_hostname }}.{{ common_domain }}