Minor service changes, create .ssh directory
This commit is contained in:
parent
2ab5e67b65
commit
6b26cadb11
@ -19,6 +19,9 @@
|
|||||||
# This is a really stupid way to do it, but alas.
|
# This is a really stupid way to do it, but alas.
|
||||||
# This uses an environment variable named ansiblesvc_key in Semaphore which has the ssh-rsa pubkey.
|
# This uses an environment variable named ansiblesvc_key in Semaphore which has the ssh-rsa pubkey.
|
||||||
- name: Add deployment user's SSH key.
|
- name: Add deployment user's SSH key.
|
||||||
|
file:
|
||||||
|
path: /home/ansible/.ssh
|
||||||
|
state: directory
|
||||||
shell:
|
shell:
|
||||||
cmd: echo "{{ ansiblesvc_key }}" > /home/ansible/.ssh/authorized_keys
|
cmd: echo "{{ ansiblesvc_key }}" > /home/ansible/.ssh/authorized_keys
|
||||||
creates: /home/ansible/.ssh/authorized_keys
|
creates: /home/ansible/.ssh/authorized_keys
|
||||||
@ -37,7 +40,7 @@
|
|||||||
service:
|
service:
|
||||||
name: firewalld
|
name: firewalld
|
||||||
state: stopped
|
state: stopped
|
||||||
enabled: False
|
enabled: no
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
|
|
||||||
# User account (nhadmin) configuration, for sysadmin use
|
# User account (nhadmin) configuration, for sysadmin use
|
||||||
@ -65,7 +68,7 @@
|
|||||||
|
|
||||||
# Delete our network ansible key from the root user.
|
# Delete our network ansible key from the root user.
|
||||||
- name: Delete our network ansible key (and other keys) from the root user.
|
- name: Delete our network ansible key (and other keys) from the root user.
|
||||||
ansible.builtin.file:
|
file:
|
||||||
path: /root/.ssh/authorized_keys
|
path: /root/.ssh/authorized_keys
|
||||||
state: absent
|
state: absent
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
Loading…
x
Reference in New Issue
Block a user