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: ## 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 2. During installation create a user named `ansible` with any password
3. After installation copy SSH key to the `ansible` user 3. After installation copy SSH key to the `ansible` user
4. Enable password-less sudo access for the `ansible` user with this command: 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() { function gg() {
cd "$PROJECTS_DIR/$1"; 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; poetry shell;
fi fi
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 243 KiB

View File

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