Update to 2021-09-22 10:00

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

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

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

Loading…
Cancel
Save