Skip to content

Commit

Permalink
fix: various changes found while bootstrapping a new machine (#306)
Browse files Browse the repository at this point in the history
  • Loading branch information
hutchic authored Dec 15, 2023
1 parent 80c1bd9 commit 4a14481
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 15 deletions.
21 changes: 16 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
.PHONY: setup
.PHONY: setup clean development_environment

# Name of the virtual environment directory
VENV := venv

# Python executable inside the virtual environment
PYTHON := $(VENV)/bin/python
PIP := $(VENV)/bin/pip

development_environment: setup
ansible-playbook -i "localhost," playbook.yml --ask-become-pass

setup:
pip install -r requirements.txt
pip freeze --user > requirements.txt
setup: $(VENV)/bin/activate
$(PIP) install -r requirements.txt
$(PIP) freeze > requirements.txt
test -d galaxy || ansible-galaxy install -p galaxy -f -r requirements.yml

$(VENV)/bin/activate:
test -d $(VENV) || python3 -m venv $(VENV)
$(PYTHON) -m pip install --upgrade pip

clean:
rm -rf galaxy
rm -rf galaxy $(VENV)
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Ansible playbooks that control my various computers

```
sudo apt update
sudo apt install python3-pip
sudo apt install python3-pip python3.11-venv
export PATH=$HOME/.local/bin:$PATH
USER=ubuntu make development_environment
Expand Down Expand Up @@ -62,6 +62,7 @@ git config --global user.signingkey [email protected]
git config --global commit.gpgsign true
git config --global user.name "Colin Hutchinson"
git config --global push.default current
git config --global init.defaultBranch main
```

# Setup ssh private key
Expand Down
2 changes: 2 additions & 0 deletions group_vars/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ apt_things_to_install:
- gnome-screenshot
- monkeysphere
- openssh-server
- net-tools
- wireless-tools
2 changes: 1 addition & 1 deletion install-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
- name: Add user to docker group
become: yes
user:
name: "{{ lookup('env' 'USER') }}"
name: "hutchic"
groups: docker
append: yes
16 changes: 8 additions & 8 deletions playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
git_install_from_source_dependencies:
- gcc
pre_tasks:
- name: import ssh authorized key
ansible.posix.authorized_key:
user: "ubuntu"
state: present
key: "{{ lookup('url', 'https://hutchic.keybase.pub/id_rsa.pub', split_lines=False) }}"

- name: Install 1password
include: install-1password.yml
# - name: import ssh authorized key
# ansible.posix.authorized_key:
# user: "hutchic"
# state: present
# key: "{{ lookup('url', 'https://keybase.io/hutchic/pgp_keys.asc?fingerprint=2456905d58033cb18166454aef080fc8d67f84bc', split_lines=False) }}"

# - name: Install 1password
# include: install-1password.yml

- name: Upgrade via apt
become: yes
Expand Down
12 changes: 12 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@ black==23.3.0
boxsdk==3.7.1
bracex==2.3.post1
certifi==2023.7.22
cffi==1.16.0
cfgv==3.3.1
charset-normalizer==3.1.0
click==8.1.7
commonmark==0.9.1
cryptography==41.0.7
detect-secrets @ git+https://github.com/ibm/detect-secrets.git@0ccc25a57be21eb401e0bd37e5c053c20a818208
distlib==0.3.6
enrich==1.2.7
Expand All @@ -20,7 +23,9 @@ idna==3.4
iniconfig==2.0.0
Jinja2==3.1.2
jsonschema==4.20.0
jsonschema-specifications==2023.11.2
markdown-it-py==2.2.0
MarkupSafe==2.1.3
mdurl==0.1.2
mypy-extensions==1.0.0
nodeenv==1.7.0
Expand All @@ -30,21 +35,28 @@ platformdirs==3.10.0
pluggy==1.0.0
pre-commit==3.2.2
py==1.11.0
pycparser==2.21
Pygments==2.16.1
PyJWT==2.8.0
pyrsistent==0.19.3
pytest==7.3.1
python-dateutil==2.8.2
PyYAML==6.0.1
referencing==0.32.0
requests==2.31.0
requests-toolbelt==0.10.1
resolvelib==0.5.4
rich==13.3.4
rpds-py==0.13.2
ruamel.yaml==0.17.21
ruamel.yaml.clib==0.2.7
six==1.16.0
subprocess-tee==0.4.1
tabulate==0.9.0
tenacity==8.2.2
toml==0.10.2
tomli==2.0.1
urllib3==2.1.0
virtualenv==20.21.0
wcmatch==8.4.1
wrapt==1.15.0
Expand Down

0 comments on commit 4a14481

Please sign in to comment.