regluit/vagrant/hello2.yml

20 lines
672 B
YAML

- name: Hello Ansible
hosts: localvm
vars:
user: "{{ ansible_ssh_user }}"
sudo: yes
tasks:
- name: Hello server
shell: date > now.txt
- name: create self-signed SSL cert
command: openssl req -new -nodes -x509 -subj "/C=US/ST=NJ/L=Montclair/O=Gluejar Inc./CN=localhost" -days 365 -keyout /etc/ssl/private/server.key -out /etc/ssl/certs/server.crt creates=/etc/ssl/certs/server.crt
sudo: yes
- name: set mode on /etc/ssl/certs/server.crt
file: path=/etc/ssl/certs/server.crt mode=0644
- name: set mode on /etc/ssl/private/server.key
file: path=/etc/ssl/private/server.key mode=0600