Skip to content

Commit

Permalink
[skip travis] updates to last commit
Browse files Browse the repository at this point in the history
Signed-off-by: Charlie Mordant <cmordant1@gmail.com>
  • Loading branch information
Tcharl committed Mar 3, 2024
1 parent f97cb76 commit 1830302
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions tasks/nfs-client-automount-entry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
mode: "0755"
owner: "root"
group: "root"
when: mountpoint.local is defined and (mountpoint.csi_mount is not defined or not mountpoint.csi_mount)
failed_when: False
become: true

Expand All @@ -15,17 +16,19 @@
set -o pipefail && echo '{{ company_realm_password }}' | kinit admin > /dev/null
ipa automountmap-add default auto.{{ hostname | default(volume_machine_hostname.stdout) + '.' + mountpoint.local | replace('/', '') }}
delegate_to: "{{ groups[idm_group][0] }}"
# ipa automountmap-add {{ mountpoint.local | replace('/', '') }} auto.{{ mountpoint.local | replace('/', '') }}
when: mountpoint.local is defined and (mountpoint.csi_mount is not defined or not mountpoint.csi_mount)
no_log: "{{ secure_logs }}"
failed_when: False
changed_when: False
register: automountmap_added_master
changed_when: "'Added automount map' in automountmap_added_master.stdout"
become: true

- name: Nfs-client-automount-entry | create automountkey on master
ansible.builtin.shell: |
set -o pipefail && echo '{{ company_realm_password }}' | kinit admin > /dev/null
ipa automountkey-add default auto.master --key={{ mountpoint.local }} --info=auto.{{ hostname | default(volume_machine_hostname.stdout) + '.' + mountpoint.local | replace('/', '') }}
delegate_to: "{{ groups[idm_group][0] }}"
when: mountpoint.local is defined and (mountpoint.csi_mount is not defined or not mountpoint.csi_mount)
register: automountkey_added_master
changed_when: "'Added automount key' in automountkey_added_master.stdout"
notify: nfs_client | handler | reload-automount
Expand All @@ -38,25 +41,23 @@
set -o pipefail && echo '{{ company_realm_password }}' | kinit admin > /dev/null
ipa automountkey-add default auto.{{ hostname | default(volume_machine_hostname.stdout) + '.' + mountpoint.local | replace('/', '') }} --key='*' --info="-fstype=nfs4,rw,sec=krb5p,soft,rsize=8192,wsize=8192 {{ nfs_server.host }}:{{ mountpoint.remote }}"
delegate_to: "{{ groups[idm_group][0] }}" # the key was {{ hostname | default(volume_machine_hostname.stdout) }} but it was not really appealing for users
when: mountpoint.local is defined and (mountpoint.csi_mount is not defined or not mountpoint.csi_mount) and (mountpoint.insecure is not defined or not mountpoint.insecure)
no_log: "{{ secure_logs }}"
register: automountkey_added
changed_when: "'Added automount key' in automountkey_added.stdout"
failed_when: False
notify: nfs_client | handler | reload-automount
when: mountpoint.insecure is not defined or not mountpoint.insecure
become: true

- name: Nfs-client-automount-entry | create automountkey for insecure mountpoint
ansible.builtin.shell: |
set -o pipefail && echo '{{ company_realm_password }}' | kinit admin > /dev/null
ipa automountkey-add default auto.{{ hostname | default(volume_machine_hostname.stdout) + '.' + mountpoint.local | replace('/', '') }} --key='{{ mountpoint.min_ip_to_share | ansible.utils.next_nth_usable(mountpoint.nth_ips_to_share | default(9)) }}' --info="-fstype=nfs4,rw,soft,rsize=8192,wsize=8192 {{ nfs_server.host }}:{{ mountpoint.remote }}"
delegate_to: "{{ groups[idm_group][0] }}" # the key was {{ hostname | default(volume_machine_hostname.stdout) }} but it was not really appealing for users
when: mountpoint.local is defined and (mountpoint.csi_mount is not defined or not mountpoint.csi_mount) and (mountpoint.insecure is defined and mountpoint.insecure)
no_log: "{{ secure_logs }}"
register: automountkey_added
changed_when: "'Added automount key' in automountkey_added.stdout"
failed_when: False
notify: nfs_client | handler | reload-automount
when:
- mountpoint.insecure is defined
- mountpoint.insecure | bool
become: true

0 comments on commit 1830302

Please sign in to comment.