-
Notifications
You must be signed in to change notification settings - Fork 28
Add freeipa roles for PvC pre_setup RHEL only #144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
5162fb1
Add freeipa roles for PvC pre_setup RHEL only
clevesque 9a9139b
Add freeipa roles for PvC pre_setup RHEL only
clevesque 7d677a4
Add freeipa roles for PvC pre_setup RHEL only
clevesque 3f634ef
Add freeipa roles for PvC pre_setup RHEL only
clevesque f69927c
check for edge case when using some CentosOS versions
clevesque File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| --- | ||
|
|
||
| # Copyright 2023 Cloudera, Inc. All Rights Reserved. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| # ipaserver_domain: | ||
| # ipaserver_realm: | ||
| # ipa_hosts: # List of FQDN of IPA hosts | ||
| # ipa_server_ips: # List of IP of IPA hosts | ||
| # ipaadmin_principal: | ||
| # ipaadmin_password: | ||
|
|
||
| enable_dns: false | ||
| fallback_nameservers: [ "8.8.8.8" ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| --- | ||
|
|
||
| # Copyright 2023 Cloudera, Inc. All Rights Reserved. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| - name: restart host | ||
| ansible.builtin.reboot: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| --- | ||
|
|
||
| # Copyright 2023 Cloudera, Inc. All Rights Reserved. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| galaxy_info: | ||
| role_name: freeipa_client | ||
| namespace: cloudera | ||
| author: Webster Mudge Jim Enright Chuck Levesque | ||
| description: > | ||
| Deployment of FreeIPA clients for Cloudera Data Platform (CDP) Base and ECS | ||
| company: Cloudera | ||
| namespace: cloudera | ||
| license: Apache-2.0 | ||
|
|
||
| min_ansible_version: 2.10 | ||
|
|
||
| platforms: | ||
| - name: Debian | ||
| versions: all | ||
| - name: Fedora | ||
| versions: all | ||
| - name: GenericLinux | ||
| versions: all | ||
| - name: MacOSX | ||
| versions: all | ||
| - name: Ubuntu | ||
| versions: all | ||
|
|
||
| galaxy_tags: | ||
wmudge marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - cloudera | ||
| - cdp | ||
| - freeipa | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,104 @@ | ||
| --- | ||
|
|
||
| # Copyright 2023 Cloudera, Inc. All Rights Reserved. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| - name: Disable SELinux | ||
| ansible.builtin.selinux: | ||
| state: disabled | ||
| notify: restart host | ||
|
|
||
| - name: Set up DNS and networking | ||
| when: enable_dns | ||
| block: | ||
| - name: Update RHEL networking | ||
| when: ansible_facts['os_family'] == 'RedHat' | ||
| block: | ||
| - name: Set cloud-init to preserve hostname (RHEL) | ||
| ansible.builtin.lineinfile: | ||
| path: /etc/cloud/cloud.cfg | ||
| regex: "^(#)?preserve_hostname" | ||
| line: "preserve_hostname: 1" | ||
| state: present | ||
| notify: restart host | ||
|
|
||
| - name: Set interface config to preserve resolv.conf changes (RHEL)' | ||
| ansible.builtin.lineinfile: | ||
| path: "/etc/sysconfig/network-scripts/ifcfg-{{ ansible_default_ipv4.interface }}" | ||
| regex: "^(#)?PEERDNS" | ||
| line: "PEERDNS=no" | ||
| state: present | ||
| notify: restart host | ||
|
|
||
| - name: Set /etc/NetworkManager/conf.d/disable-resolve.conf-managing.conf (RHEL) | ||
| ansible.builtin.copy: | ||
| dest: /etc/NetworkManager/conf.d/disable-resolve.conf-managing.conf | ||
| content: | | ||
| # Generated by Ansible | ||
| [main] | ||
| dns=none | ||
| notify: restart host | ||
|
|
||
| - name: Set /etc/resolv.conf directly | ||
| ansible.builtin.copy: | ||
| dest: /etc/resolv.conf | ||
| content: | | ||
| # Generated by Ansible | ||
| search {{ ipaserver_domain }} | ||
| {{ ['nameserver '] | product(ipa_server_ips | sort) | map('join') | join('\n') }} | ||
| notify: restart host | ||
|
|
||
| - name: Set /etc/hostname to the FQDN | ||
| ansible.builtin.copy: | ||
| content: "{{ inventory_hostname }}" | ||
| dest: /etc/hostname | ||
| notify: restart host | ||
|
|
||
| - name: Set /etc/hosts | ||
| ansible.builtin.copy: | ||
| dest: /etc/hosts | ||
| content: | | ||
| # Set by Ansible | ||
| {{ ansible_default_ipv4.address }} {{ inventory_hostname }} {{ inventory_hostname_short }} | ||
| notify: restart host | ||
|
|
||
| - name: Set /etc/dhcp/dhclient.conf for domain search and name servers | ||
| ansible.builtin.lineinfile: | ||
| path: /etc/dhcp/dhclient.conf | ||
| regex: "^(#)?{{ dhclient_entry.value }}" | ||
| line: "{{ dhclient_entry.value }}" | ||
| state: present | ||
| loop: "{{ entries | dict2items }}" | ||
| loop_control: | ||
| loop_var: dhclient_entry | ||
| label: "{{ dhclient_entry.key }}" | ||
| vars: | ||
| entries: | ||
| domain_search: supersede domain-search "{{ ipaserver_domain }}"; | ||
| domain_name_servers: supersede domain-name-servers {{ ipa_server_ips | sort | union(fallback_nameservers) | join(', ') }}; | ||
| notify: restart host | ||
|
|
||
| - name: Flush handlers | ||
| ansible.builtin.meta: flush_handlers | ||
|
|
||
| - name: Set up the FreeIPA Client | ||
| ansible.builtin.include_role: | ||
| name: freeipa.ansible_freeipa.ipaclient | ||
| vars: | ||
| state: present | ||
| ipaclient_hostname: "{{ inventory_hostname }}" | ||
| ipaclient_servers: "{{ ipa_hosts }}" | ||
| ipaserver_setup_dns: "{{ enable_dns }}" | ||
| ipasssd_enable_dns_updates: "{{ enable_dns }}" | ||
| ipaclient_mkhomedir: yes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| --- | ||
|
|
||
| # Copyright 2023 Cloudera, Inc. All Rights Reserved. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| #ipaserver_realm: "{{ krb5_realm | upper }}" | ||
| #ipaserver_domain: "{{ krb5_domain | default(krb5_realm | lower) }}" | ||
| #ipaserver_setup_firewalld: "no" | ||
| #ipaserver_setup_dns: "{{ freeipa_autodns | default(omit) }}" | ||
| #ipaserver_auto_forwarders: | ||
| #ipadm_password: | ||
|
|
||
| # ipaserver_recursion_acl_cidr: | ||
| ipaserver_resolv_nameservers: [ '8.8.8.8' ] | ||
| ipaserver_server_recursion: true | ||
| enable_dns: false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| --- | ||
|
|
||
| # Copyright 2023 Cloudera, Inc. All Rights Reserved. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| - name: restart host | ||
| ansible.builtin.reboot: | ||
|
|
||
| - name: restart dns | ||
| ansible.builtin.service: | ||
| name: named-pkcs11 | ||
| state: restarted |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| --- | ||
|
|
||
| # Copyright 2023 Cloudera, Inc. All Rights Reserved. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| galaxy_info: | ||
| role_name: freeipa_server | ||
| namespace: cloudera | ||
| author: Webster Mudge Jim Enright Chuck Levesque | ||
| description: > | ||
wmudge marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| Deployment of sidecar FreeIPA Server for Cloudera Data Platform (CDP) Base and ECS | ||
| company: Cloudera | ||
| namespace: cloudera | ||
| license: Apache-2.0 | ||
|
|
||
| min_ansible_version: 2.10 | ||
|
|
||
| platforms: | ||
| - name: Debian | ||
| versions: all | ||
| - name: Fedora | ||
| versions: all | ||
| - name: GenericLinux | ||
| versions: all | ||
| - name: MacOSX | ||
| versions: all | ||
| - name: Ubuntu | ||
| versions: all | ||
|
|
||
| galaxy_tags: | ||
wmudge marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - cloudera | ||
| - cdp | ||
| - freeipa | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.