my $O = new IO::File;
open $O, ("| gpg --encrypt --armor"
- ." --trust-model always --recipient root\@core"
+ ." --recipient-file /etc/root-pub.pem"
." > $tmp") or die "Error running gpg > $tmp: $!\n";
print $O <<EOD;
username: $username
group: root
- name: Install root PGP key file.
- become: no
+ become: yes
copy:
src: ../Secret/root-pub.pem
- dest: ~/.gnupg-root-pub.pem
+ dest: /etc/root-pub.pem
mode: u=r,g=r,o=r
notify: Import root PGP key.
#+END_SRC
- name: Import root PGP key.
become: no
- command: gpg --import ~/.gnupg-root-pub.pem
+ command: gpg --import /etc/root-pub.pem
#+END_SRC
** The Old Command
group: root
- name: Install root PGP key file.
- become: no
+ become: yes
copy:
src: ../Secret/root-pub.pem
- dest: ~/.gnupg-root-pub.pem
+ dest: /etc/root-pub.pem
mode: u=r,g=r,o=r
notify: Import root PGP key.
my $O = new IO::File;
open $O, ("| gpg --encrypt --armor"
- ." --trust-model always --recipient root\@core"
+ ." --recipient-file /etc/root-pub.pem"
." > $tmp") or die "Error running gpg > $tmp: $!\n";
print $O <<EOD;
username: $username