-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added ability to setup target main replacement user, and remove the d…
…efault one.
- Loading branch information
Mikołaj Koziarkiewicz
committed
Apr 7, 2015
1 parent
6f3a9e9
commit d11052e
Showing
8 changed files
with
47 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
- name: Create user {{raspi_config_replace_user['name']}} | ||
user: name={{raspi_config_replace_user['name']}} | ||
changed_when: True #to force handler call | ||
notify: | ||
- remove default user | ||
- name: Add your login key to {{raspi_config_replace_user['name']}} | ||
authorized_key: user={{raspi_config_replace_user['name']}} key="{{ lookup('file', raspi_config_replace_user['path_to_ssh_key']) }}" | ||
- name: Add {{raspi_config_replace_user['name']}} to sudoers | ||
lineinfile: | ||
args: | ||
dest: /etc/sudoers | ||
line: "{{raspi_config_replace_user['name']}} ALL=(ALL) NOPASSWD: ALL" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters