Update to 2021-09-22 10:00

master
Daniel Berteaud 3 years ago
parent 0d2b783411
commit 93f3523ffb
  1. 15
      roles/includes/get_rand_pass.yml
  2. 4
      roles/repo_samba4/defaults/main.yml

@ -6,16 +6,15 @@
register: current_pass register: current_pass
# When no pass exist, create a new one # When no pass exist, create a new one
- yum: name=pwgen - name: Install pwgen
when: not current_pass.stat.exists and ansible_os_family == 'RedHat' package: name=pwgen
- apt: name=pwgen
when: not current_pass.stat.exists and ansible_os_family == 'Debian' - when: not current_pass.stat.exists
- shell: pwgen {% if complex | default(True) %}-y {% endif %}-s {{ pass_size | default(50) }} 1 | sed -e 's/[\"\`'"'"']//g' block:
- shell: pwgen {% if complex | default(True) %}-y -r \`\'\"\\\|\^\# {% endif %}-s {{ pass_size | default(50) }} 1
register: rand_pass register: rand_pass
when: not current_pass.stat.exists
# Now write this new pass # Now write this new pass
- copy: content={{ rand_pass.stdout | trim }} dest={{ pass_file }} mode=600 - copy: content={{ rand_pass.stdout | trim }} dest={{ pass_file }} mode=600
when: not current_pass.stat.exists
# When pass already exists, just read it # When pass already exists, just read it
- name: Read the password - name: Read the password

@ -1,3 +1,3 @@
--- ---
# Select a branch from https://samba.tranquil.it/centos7/ # Select a branch from https://samba.tranquil.it/centos7/ or https://samba.tranquil.it/centos7/
samba_major_version: stable samba_major_version: samba-{{ (ansible_distribution_major_version is version('8','<')) | ternary('4.12.15','4.14.7') }}

Loading…
Cancel
Save