mirror of
https://github.com/ruanbekker/rpi-ansible.git
synced 2025-05-23 15:11:32 +02:00
add stuff to make this run in remote mode too
This commit is contained in:
parent
6f72567578
commit
a3844f2b08
11
README.md
11
README.md
@ -90,6 +90,17 @@ The format expected in `roles/common/vars/main.yml` is something like
|
|||||||
- etc/ssh/ssh_host_ecdsa_key.cloverdale
|
- etc/ssh/ssh_host_ecdsa_key.cloverdale
|
||||||
- etc/ssh/ssh_host_ed25519_key.cloverdale
|
- etc/ssh/ssh_host_ed25519_key.cloverdale
|
||||||
|
|
||||||
|
### Remote mode
|
||||||
|
|
||||||
|
The playbooks can also be run in a traditional remote mode:
|
||||||
|
|
||||||
|
$ ansible-playbook --ask-become-pass --ask-vault-pass --inventory hosts.remote ./remote.yml
|
||||||
|
|
||||||
|
At present this does _not_ make use of hostvars; this is because the playbook
|
||||||
|
started out designed to be run against localhost and the playbook
|
||||||
|
self-identifies the system and fetches configuration variables from
|
||||||
|
`roles/common/vars/main.yml` based on that.
|
||||||
|
|
||||||
## Acknowledgment
|
## Acknowledgment
|
||||||
|
|
||||||
I stole a lot of knowledge from https://github.com/giuaig/ansible-raspi-config/.
|
I stole a lot of knowledge from https://github.com/giuaig/ansible-raspi-config/.
|
||||||
|
4
hosts.remote
Normal file
4
hosts.remote
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
[raspberrypi]
|
||||||
|
cloverdale.local
|
||||||
|
cloverleaf.local
|
||||||
|
clovermine.local
|
7
remote.yml
Normal file
7
remote.yml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
- hosts: raspberrypi
|
||||||
|
become: yes
|
||||||
|
become_user: root
|
||||||
|
become_method: sudo
|
||||||
|
roles:
|
||||||
|
- common
|
Loading…
x
Reference in New Issue
Block a user