From ea0c0435c44f2823a84327d9066ef30d5437876e Mon Sep 17 00:00:00 2001 From: Chris Hammer Date: Fri, 8 Dec 2023 01:30:44 -0500 Subject: [PATCH] this adds a bunch of roles. who knows the state lol... we'll get it fixed! --- .gitignore | 8 ---- galaxy.yml | 2 +- roles/bashrc/README.md | 38 +++++++++++++++++ roles/bashrc/defaults/main.yml | 2 + roles/bashrc/files/bashrc | 4 ++ roles/bashrc/handlers/main.yml | 2 + roles/bashrc/meta/main.yml | 52 ++++++++++++++++++++++++ roles/bashrc/tasks/main.yml | 9 ++++ roles/bashrc/tests/inventory | 2 + roles/bashrc/tests/test.yml | 5 +++ roles/bashrc/vars/main.yml | 2 + roles/default_services/README.md | 38 +++++++++++++++++ roles/default_services/defaults/main.yml | 2 + roles/default_services/files/.keep | 0 roles/default_services/handlers/main.yml | 2 + roles/default_services/meta/main.yml | 52 ++++++++++++++++++++++++ roles/default_services/tasks/main.yml | 2 + roles/default_services/templates/.keep | 0 roles/default_services/tests/inventory | 2 + roles/default_services/tests/test.yml | 5 +++ roles/default_services/vars/main.yml | 2 + roles/hostname/README.md | 38 +++++++++++++++++ roles/hostname/defaults/main.yml | 2 + roles/hostname/handlers/main.yml | 43 ++++++++++++++++++++ roles/hostname/meta/main.yml | 52 ++++++++++++++++++++++++ roles/hostname/tasks/main.yml | 9 ++++ roles/hostname/tests/inventory | 2 + roles/hostname/tests/test.yml | 5 +++ roles/hostname/vars/main.yml | 2 + roles/ipa_client/README.md | 38 +++++++++++++++++ roles/ipa_client/defaults/main.yml | 7 ++++ roles/ipa_client/files/.keep | 0 roles/ipa_client/handlers/main.yml | 2 + roles/ipa_client/meta/main.yml | 52 ++++++++++++++++++++++++ roles/ipa_client/tasks/main.yml | 14 +++++++ roles/ipa_client/templates/.keep | 0 roles/ipa_client/tests/inventory | 2 + roles/ipa_client/tests/test.yml | 5 +++ roles/ipa_client/vars/main.yml | 2 + roles/node_status/README.md | 38 +++++++++++++++++ roles/node_status/defaults/main.yml | 2 + roles/node_status/files/.keep | 0 roles/node_status/handlers/main.yml | 2 + roles/node_status/meta/main.yml | 52 ++++++++++++++++++++++++ roles/node_status/tasks/main.yml | 2 + roles/node_status/templates/.keep | 0 roles/node_status/tests/inventory | 2 + roles/node_status/tests/test.yml | 5 +++ roles/node_status/vars/main.yml | 2 + roles/selinux/README.md | 38 +++++++++++++++++ roles/selinux/defaults/main.yml | 2 + roles/selinux/files/.keep | 0 roles/selinux/handlers/main.yml | 2 + roles/selinux/meta/main.yml | 52 ++++++++++++++++++++++++ roles/selinux/tasks/main.yml | 2 + roles/selinux/templates/.keep | 0 roles/selinux/tests/inventory | 2 + roles/selinux/tests/test.yml | 5 +++ roles/selinux/vars/main.yml | 2 + 59 files changed, 707 insertions(+), 9 deletions(-) delete mode 100644 .gitignore create mode 100644 roles/bashrc/README.md create mode 100644 roles/bashrc/defaults/main.yml create mode 100644 roles/bashrc/files/bashrc create mode 100644 roles/bashrc/handlers/main.yml create mode 100644 roles/bashrc/meta/main.yml create mode 100644 roles/bashrc/tasks/main.yml create mode 100644 roles/bashrc/tests/inventory create mode 100644 roles/bashrc/tests/test.yml create mode 100644 roles/bashrc/vars/main.yml create mode 100644 roles/default_services/README.md create mode 100644 roles/default_services/defaults/main.yml create mode 100644 roles/default_services/files/.keep create mode 100644 roles/default_services/handlers/main.yml create mode 100644 roles/default_services/meta/main.yml create mode 100644 roles/default_services/tasks/main.yml create mode 100644 roles/default_services/templates/.keep create mode 100644 roles/default_services/tests/inventory create mode 100644 roles/default_services/tests/test.yml create mode 100644 roles/default_services/vars/main.yml create mode 100644 roles/hostname/README.md create mode 100644 roles/hostname/defaults/main.yml create mode 100644 roles/hostname/handlers/main.yml create mode 100644 roles/hostname/meta/main.yml create mode 100644 roles/hostname/tasks/main.yml create mode 100644 roles/hostname/tests/inventory create mode 100644 roles/hostname/tests/test.yml create mode 100644 roles/hostname/vars/main.yml create mode 100644 roles/ipa_client/README.md create mode 100644 roles/ipa_client/defaults/main.yml create mode 100644 roles/ipa_client/files/.keep create mode 100644 roles/ipa_client/handlers/main.yml create mode 100644 roles/ipa_client/meta/main.yml create mode 100644 roles/ipa_client/tasks/main.yml create mode 100644 roles/ipa_client/templates/.keep create mode 100644 roles/ipa_client/tests/inventory create mode 100644 roles/ipa_client/tests/test.yml create mode 100644 roles/ipa_client/vars/main.yml create mode 100644 roles/node_status/README.md create mode 100644 roles/node_status/defaults/main.yml create mode 100644 roles/node_status/files/.keep create mode 100644 roles/node_status/handlers/main.yml create mode 100644 roles/node_status/meta/main.yml create mode 100644 roles/node_status/tasks/main.yml create mode 100644 roles/node_status/templates/.keep create mode 100644 roles/node_status/tests/inventory create mode 100644 roles/node_status/tests/test.yml create mode 100644 roles/node_status/vars/main.yml create mode 100644 roles/selinux/README.md create mode 100644 roles/selinux/defaults/main.yml create mode 100644 roles/selinux/files/.keep create mode 100644 roles/selinux/handlers/main.yml create mode 100644 roles/selinux/meta/main.yml create mode 100644 roles/selinux/tasks/main.yml create mode 100644 roles/selinux/templates/.keep create mode 100644 roles/selinux/tests/inventory create mode 100644 roles/selinux/tests/test.yml create mode 100644 roles/selinux/vars/main.yml diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 1edf6c3..0000000 --- a/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -roles/* -!roles/.keep -!roles/etc_hosts -!roles/base_packages -!roles/resolv_conf -!roles/update_all_packages -!roles/motd -!roles/snmpd_conf diff --git a/galaxy.yml b/galaxy.yml index ab99659..15ce2b4 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -8,7 +8,7 @@ namespace: jchristianh name: baseos # The version of the collection. Must be compatible with semantic versioning -version: 1.0.6 +version: 1.0.7 # The path to the Markdown (.md) readme file. This path is relative to the root of the collection readme: README.md diff --git a/roles/bashrc/README.md b/roles/bashrc/README.md new file mode 100644 index 0000000..225dd44 --- /dev/null +++ b/roles/bashrc/README.md @@ -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). diff --git a/roles/bashrc/defaults/main.yml b/roles/bashrc/defaults/main.yml new file mode 100644 index 0000000..3887e66 --- /dev/null +++ b/roles/bashrc/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for bashrc diff --git a/roles/bashrc/files/bashrc b/roles/bashrc/files/bashrc new file mode 100644 index 0000000..c4ff33c --- /dev/null +++ b/roles/bashrc/files/bashrc @@ -0,0 +1,4 @@ +export PS1='\[\033[38;5;081m\]\u\[\033[38;5;245m\]@\[\033[38;5;206m\]\H \[\033[38;5;245m\]\w\[\033[38;5;206m\]$ \[\e[0m\]' + +alias ansible-playbook="time /usr/bin/ansible-playbook" +alias tm="clear;tail -F /var/log/messages" diff --git a/roles/bashrc/handlers/main.yml b/roles/bashrc/handlers/main.yml new file mode 100644 index 0000000..289b36b --- /dev/null +++ b/roles/bashrc/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for bashrc diff --git a/roles/bashrc/meta/main.yml b/roles/bashrc/meta/main.yml new file mode 100644 index 0000000..c572acc --- /dev/null +++ b/roles/bashrc/meta/main.yml @@ -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. diff --git a/roles/bashrc/tasks/main.yml b/roles/bashrc/tasks/main.yml new file mode 100644 index 0000000..c8ebb5a --- /dev/null +++ b/roles/bashrc/tasks/main.yml @@ -0,0 +1,9 @@ +--- +- name: Deploy .bashrc + copy: + src : files/bashrc + dest : /root/.bashrc + mode : 0640 + + +... diff --git a/roles/bashrc/tests/inventory b/roles/bashrc/tests/inventory new file mode 100644 index 0000000..878877b --- /dev/null +++ b/roles/bashrc/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/roles/bashrc/tests/test.yml b/roles/bashrc/tests/test.yml new file mode 100644 index 0000000..50a8ecf --- /dev/null +++ b/roles/bashrc/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - bashrc diff --git a/roles/bashrc/vars/main.yml b/roles/bashrc/vars/main.yml new file mode 100644 index 0000000..940dd24 --- /dev/null +++ b/roles/bashrc/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for bashrc diff --git a/roles/default_services/README.md b/roles/default_services/README.md new file mode 100644 index 0000000..225dd44 --- /dev/null +++ b/roles/default_services/README.md @@ -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). diff --git a/roles/default_services/defaults/main.yml b/roles/default_services/defaults/main.yml new file mode 100644 index 0000000..2b35111 --- /dev/null +++ b/roles/default_services/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for default_services diff --git a/roles/default_services/files/.keep b/roles/default_services/files/.keep new file mode 100644 index 0000000..e69de29 diff --git a/roles/default_services/handlers/main.yml b/roles/default_services/handlers/main.yml new file mode 100644 index 0000000..d1be361 --- /dev/null +++ b/roles/default_services/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for default_services diff --git a/roles/default_services/meta/main.yml b/roles/default_services/meta/main.yml new file mode 100644 index 0000000..c572acc --- /dev/null +++ b/roles/default_services/meta/main.yml @@ -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. diff --git a/roles/default_services/tasks/main.yml b/roles/default_services/tasks/main.yml new file mode 100644 index 0000000..4edc337 --- /dev/null +++ b/roles/default_services/tasks/main.yml @@ -0,0 +1,2 @@ +--- +# tasks file for default_services diff --git a/roles/default_services/templates/.keep b/roles/default_services/templates/.keep new file mode 100644 index 0000000..e69de29 diff --git a/roles/default_services/tests/inventory b/roles/default_services/tests/inventory new file mode 100644 index 0000000..878877b --- /dev/null +++ b/roles/default_services/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/roles/default_services/tests/test.yml b/roles/default_services/tests/test.yml new file mode 100644 index 0000000..c11db68 --- /dev/null +++ b/roles/default_services/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - default_services diff --git a/roles/default_services/vars/main.yml b/roles/default_services/vars/main.yml new file mode 100644 index 0000000..109f5a1 --- /dev/null +++ b/roles/default_services/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for default_services diff --git a/roles/hostname/README.md b/roles/hostname/README.md new file mode 100644 index 0000000..225dd44 --- /dev/null +++ b/roles/hostname/README.md @@ -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). diff --git a/roles/hostname/defaults/main.yml b/roles/hostname/defaults/main.yml new file mode 100644 index 0000000..6d6b22d --- /dev/null +++ b/roles/hostname/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for hostname diff --git a/roles/hostname/handlers/main.yml b/roles/hostname/handlers/main.yml new file mode 100644 index 0000000..0618bfa --- /dev/null +++ b/roles/hostname/handlers/main.yml @@ -0,0 +1,43 @@ +--- +- name: restart_syslog_centos_7 + service: + name : rsyslog + state : restarted + + +- name: restart_syslog_centos_8 + service: + name : syslog + state : restarted + +- name: restart_syslog_centos_9 + service: + name : rsyslog + state : restarted + + +- name: restart_syslog_redhat_8 + service: + name : rsyslog + state : restarted + + +- name: restart_syslog_redhat_9 + service: + name : rsyslog + state : restarted + + +- name: restart_syslog_debian_11 + service: + name : rsyslog + state : restarted + + +- name: restart_syslog_fedora_35 + service: + name : rsyslog + state : restarted + + +... diff --git a/roles/hostname/meta/main.yml b/roles/hostname/meta/main.yml new file mode 100644 index 0000000..c572acc --- /dev/null +++ b/roles/hostname/meta/main.yml @@ -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. diff --git a/roles/hostname/tasks/main.yml b/roles/hostname/tasks/main.yml new file mode 100644 index 0000000..89d79f3 --- /dev/null +++ b/roles/hostname/tasks/main.yml @@ -0,0 +1,9 @@ +--- +- name: Set hostname for host + hostname: + name: "{{ inventory_hostname }}" + notify: + - "restart_syslog_{{ ansible_distribution | lower }}_{{ ansible_distribution_major_version }}" + + +... diff --git a/roles/hostname/tests/inventory b/roles/hostname/tests/inventory new file mode 100644 index 0000000..878877b --- /dev/null +++ b/roles/hostname/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/roles/hostname/tests/test.yml b/roles/hostname/tests/test.yml new file mode 100644 index 0000000..8a43845 --- /dev/null +++ b/roles/hostname/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - hostname diff --git a/roles/hostname/vars/main.yml b/roles/hostname/vars/main.yml new file mode 100644 index 0000000..3afc2e0 --- /dev/null +++ b/roles/hostname/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for hostname diff --git a/roles/ipa_client/README.md b/roles/ipa_client/README.md new file mode 100644 index 0000000..225dd44 --- /dev/null +++ b/roles/ipa_client/README.md @@ -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). diff --git a/roles/ipa_client/defaults/main.yml b/roles/ipa_client/defaults/main.yml new file mode 100644 index 0000000..019a274 --- /dev/null +++ b/roles/ipa_client/defaults/main.yml @@ -0,0 +1,7 @@ +--- +do_ipa_registration : True + + +ipa_domain : thezengarden.net +ipa_auth_server : ipa.thezengarden.net +ipa_otp : Bap2e5adcWoHZtEPE diff --git a/roles/ipa_client/files/.keep b/roles/ipa_client/files/.keep new file mode 100644 index 0000000..e69de29 diff --git a/roles/ipa_client/handlers/main.yml b/roles/ipa_client/handlers/main.yml new file mode 100644 index 0000000..c945aca --- /dev/null +++ b/roles/ipa_client/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for ipa_client diff --git a/roles/ipa_client/meta/main.yml b/roles/ipa_client/meta/main.yml new file mode 100644 index 0000000..c572acc --- /dev/null +++ b/roles/ipa_client/meta/main.yml @@ -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. diff --git a/roles/ipa_client/tasks/main.yml b/roles/ipa_client/tasks/main.yml new file mode 100644 index 0000000..640e358 --- /dev/null +++ b/roles/ipa_client/tasks/main.yml @@ -0,0 +1,14 @@ +--- +- name: Check for existing IPA registration + lineinfile: + path: /etc/krb5.conf + regexp: "{{ ipa_auth_server }}" + state: absent + changed_when: false + register: ipa_registered_check + + +- name: Register system against IPA server + command: ipa-client-install --server {{ ipa_auth_server }}\ + --domain {{ ipa_domain }} --mkhomedir -w {{ ipa_otp }} --unattended + when: not ipa_registered_check.found diff --git a/roles/ipa_client/templates/.keep b/roles/ipa_client/templates/.keep new file mode 100644 index 0000000..e69de29 diff --git a/roles/ipa_client/tests/inventory b/roles/ipa_client/tests/inventory new file mode 100644 index 0000000..878877b --- /dev/null +++ b/roles/ipa_client/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/roles/ipa_client/tests/test.yml b/roles/ipa_client/tests/test.yml new file mode 100644 index 0000000..341c090 --- /dev/null +++ b/roles/ipa_client/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - ipa_client diff --git a/roles/ipa_client/vars/main.yml b/roles/ipa_client/vars/main.yml new file mode 100644 index 0000000..5145ad0 --- /dev/null +++ b/roles/ipa_client/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for ipa_client diff --git a/roles/node_status/README.md b/roles/node_status/README.md new file mode 100644 index 0000000..225dd44 --- /dev/null +++ b/roles/node_status/README.md @@ -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). diff --git a/roles/node_status/defaults/main.yml b/roles/node_status/defaults/main.yml new file mode 100644 index 0000000..5350646 --- /dev/null +++ b/roles/node_status/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for node_status diff --git a/roles/node_status/files/.keep b/roles/node_status/files/.keep new file mode 100644 index 0000000..e69de29 diff --git a/roles/node_status/handlers/main.yml b/roles/node_status/handlers/main.yml new file mode 100644 index 0000000..eaae31c --- /dev/null +++ b/roles/node_status/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for node_status diff --git a/roles/node_status/meta/main.yml b/roles/node_status/meta/main.yml new file mode 100644 index 0000000..c572acc --- /dev/null +++ b/roles/node_status/meta/main.yml @@ -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. diff --git a/roles/node_status/tasks/main.yml b/roles/node_status/tasks/main.yml new file mode 100644 index 0000000..766c922 --- /dev/null +++ b/roles/node_status/tasks/main.yml @@ -0,0 +1,2 @@ +--- +# tasks file for node_status diff --git a/roles/node_status/templates/.keep b/roles/node_status/templates/.keep new file mode 100644 index 0000000..e69de29 diff --git a/roles/node_status/tests/inventory b/roles/node_status/tests/inventory new file mode 100644 index 0000000..878877b --- /dev/null +++ b/roles/node_status/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/roles/node_status/tests/test.yml b/roles/node_status/tests/test.yml new file mode 100644 index 0000000..0a18bd3 --- /dev/null +++ b/roles/node_status/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - node_status diff --git a/roles/node_status/vars/main.yml b/roles/node_status/vars/main.yml new file mode 100644 index 0000000..bb8ed1d --- /dev/null +++ b/roles/node_status/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for node_status diff --git a/roles/selinux/README.md b/roles/selinux/README.md new file mode 100644 index 0000000..225dd44 --- /dev/null +++ b/roles/selinux/README.md @@ -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). diff --git a/roles/selinux/defaults/main.yml b/roles/selinux/defaults/main.yml new file mode 100644 index 0000000..a076ce0 --- /dev/null +++ b/roles/selinux/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for selinux diff --git a/roles/selinux/files/.keep b/roles/selinux/files/.keep new file mode 100644 index 0000000..e69de29 diff --git a/roles/selinux/handlers/main.yml b/roles/selinux/handlers/main.yml new file mode 100644 index 0000000..7aed912 --- /dev/null +++ b/roles/selinux/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for selinux diff --git a/roles/selinux/meta/main.yml b/roles/selinux/meta/main.yml new file mode 100644 index 0000000..c572acc --- /dev/null +++ b/roles/selinux/meta/main.yml @@ -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. diff --git a/roles/selinux/tasks/main.yml b/roles/selinux/tasks/main.yml new file mode 100644 index 0000000..16f47ba --- /dev/null +++ b/roles/selinux/tasks/main.yml @@ -0,0 +1,2 @@ +--- +# tasks file for selinux diff --git a/roles/selinux/templates/.keep b/roles/selinux/templates/.keep new file mode 100644 index 0000000..e69de29 diff --git a/roles/selinux/tests/inventory b/roles/selinux/tests/inventory new file mode 100644 index 0000000..878877b --- /dev/null +++ b/roles/selinux/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/roles/selinux/tests/test.yml b/roles/selinux/tests/test.yml new file mode 100644 index 0000000..aaf4aa3 --- /dev/null +++ b/roles/selinux/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - selinux diff --git a/roles/selinux/vars/main.yml b/roles/selinux/vars/main.yml new file mode 100644 index 0000000..ffb3012 --- /dev/null +++ b/roles/selinux/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for selinux