skylab
/
skylab-ansible
Archived
2
0
Fork 0

Compare commits

...

4 Commits

4 changed files with 7 additions and 4 deletions

View File

@ -11,7 +11,8 @@ poetry run ansible-playbook ...
## Boostraping remote system for management:
1. Install a supported operating system: [Rocky Linux](https://rockylinux.org)
1. Install a supported operating system: [Rocky Linux](https://rockylinux.org),
[Fedora](https://getfedora.org)
2. During installation create a user named `ansible` with any password
3. After installation copy SSH key to the `ansible` user
4. Enable password-less sudo access for the `ansible` user with this command:

View File

@ -10,7 +10,9 @@ export PROJECTS_DIR="$HOME/Documents/projects"
function gg() {
cd "$PROJECTS_DIR/$1";
if [ -f "$PROJECTS_DIR/$1/pyproject.toml" ]; then
if [ -f "$PROJECTS_DIR/$1/ansible.cfg" ]; then
ANSIBLE_CONFIG="$PROJECTS_DIR/$1/ansible.cfg" ANSIBLE_COLLECTIONS_DIR="$PROJECTS_DIR/$1/.ansible" poetry shell;
elif [ -f "$PROJECTS_DIR/$1/pyproject.toml" ]; then
poetry shell;
fi
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 243 KiB

View File

@ -20,7 +20,7 @@
- name: Configure bash completions
become: true
ansible.builtin.blockinfile:
path: ~{{ item.0 }}/.config/bash_completions
path: ~{{ item }}/.config/bash_completions
create: true
block: >-
function _gg_completion() {
@ -30,7 +30,7 @@
complete -F _gg_completion gg
owner: "{{ ansible_user }}"
group: "{{ item.0 }}"
group: "{{ item }}"
mode: 0664
loop: "{{ _local_human_users }}"