File tree Expand file tree Collapse file tree 4 files changed +41
-3
lines changed Expand file tree Collapse file tree 4 files changed +41
-3
lines changed Original file line number Diff line number Diff line change 99
1010When you create an AWS Lightsail instance, cut & paste following lines to the
1111"Launch script" field. It may take a while until Ansible completes its tasks. To
12- monitor the progress, ``$ tail -f /var/log/cloud-init-output.log ``. Ansible also
13- creates a fresh disabled user with no login password. To enable it, ``$ sudo
14- passwd <USER_NAME> `` and enter a new password for the user.
12+ monitor the progress, ``$ tail -f /var/log/cloud-init-output.log ``.
13+
14+ As part of the setup, Ansible creates a fresh unprivileged user with no login
15+ password. It also installs the `OPKSSH `_ extension to enable authentication via
16+ Google SSO. For detailed usage and configuration, refer to the `OPKSSH `_
17+ documentation.
18+
1519
1620.. code :: bash
1721
1822 export USER_NAME=guest
1923 export USER_GECOS=" Guest Account"
2024 export USER_EMAIL=guest@morningrouti.ne
2125 curl -sL https://raw.githubusercontent.com/keisrk/morning_routine/main/bootstrap.sh | sh
26+
27+
28+ .. _OPKSSH : https://github.com/openpubkey/opkssh/
Original file line number Diff line number Diff line change 77 roles :
88 - utils
99 - user
10+ - opkssh
1011 - docker
1112 - terraform
1213 - golang
2021
2122 roles :
2223 - git
24+ - opkssh_user
2325 - rustup
2426 - jvm
2527 - gopath
Original file line number Diff line number Diff line change 1+ ---
2+
3+ # Install OPKSSH and configure sshd.
4+
5+ - name : Fetch installer script and store it in this.content
6+ uri :
7+ url : https://raw.githubusercontent.com/openpubkey/opkssh/main/scripts/install-linux.sh
8+ return_content : true
9+ register : this
10+
11+ - name : Execute installer script
12+ command :
13+ cmd : bash
14+ stdin : " {{ this.content }}"
15+ creates : /usr/local/bin/opkssh
Original file line number Diff line number Diff line change 1+ ---
2+
3+ - name : Create a directory if it does not exist
4+ file :
5+ path : " {{ ansible_env.HOME }}/.opk"
6+ state : directory
7+ mode : " 0700"
8+
9+ - name : Place a locally scoped auth_id file
10+ lineinfile :
11+ dest : " {{ ansible_env.HOME }}/.opk/auth_id"
12+ line : " {{ user_name }} {{ user_email }} https://accounts.google.com"
13+ create : true
14+ mode : " 0600"
You can’t perform that action at this time.
0 commit comments