Parcourir la source

Merge pull request #301 from jlund/openvpn-native

Use native Ansible modules in the OpenVPN role to seed the serial and database files
Luke Cyca il y a 10 ans
Parent
révision
57d426c153
1 fichiers modifiés avec 4 ajouts et 4 suppressions
  1. 4
    4
      roles/vpn/tasks/openvpn.yml

+ 4
- 4
roles/vpn/tasks/openvpn.yml Voir le fichier

50
             dest={{ openvpn_path }}/openssl-server-certificate.cnf
50
             dest={{ openvpn_path }}/openssl-server-certificate.cnf
51
 
51
 
52
 - name: Seed a blank database file that will be used when generating the Server's certificate
52
 - name: Seed a blank database file that will be used when generating the Server's certificate
53
-  command: touch {{ openvpn_path }}/index.txt
54
-           creates={{ openvpn_path }}/index.txt
53
+  file: path={{ openvpn_path }}/index.txt
54
+        state=touch
55
 
55
 
56
 - name: Seed a serial file that will be used when generating the Server's certificate
56
 - name: Seed a serial file that will be used when generating the Server's certificate
57
-  shell: echo 01 > {{ openvpn_path }}/serial
58
-         creates={{ openvpn_path }}/serial
57
+  copy: content="01"
58
+        dest={{ openvpn_path }}/serial
59
 
59
 
60
 - name: Generate CSR for the Server
60
 - name: Generate CSR for the Server
61
   command: openssl req -batch -extensions server -new -key server.key -out server.csr -config {{ openvpn_path }}/openssl-server-certificate.cnf
61
   command: openssl req -batch -extensions server -new -key server.key -out server.csr -config {{ openvpn_path }}/openssl-server-certificate.cnf

Chargement…
Annuler
Enregistrer