Merge branch 'develop'

This commit is contained in:
2021-03-07 15:44:59 +00:00
7 changed files with 55 additions and 14 deletions

View File

@@ -1 +1,18 @@
ansible_linux_setup # ansible_linux_setup
## Linux server setup
### `provision.yml`
- Set `hosts` to `all`
- Set `target_system` to `linux`
## Mac setup
### `provision.yml`
- Set `hosts` to `127.0.0.1`
- Set `connection` to `local`
- Set `default_user` to Mac user
- Set `default_user_group` to Mac user's group
- Set `ansible_become_pass` to users password for sudo

2
ansible-requirements.txt Normal file
View File

@@ -0,0 +1,2 @@
pipx inject ansible passlib
pipx inject ansible docker

View File

@@ -2,3 +2,4 @@ install_pyenv_python: true
pyenv_python_version: 3.9.1 pyenv_python_version: 3.9.1
pipx_packages: pipx_packages:
- awscli - awscli
- ansible

View File

@@ -1,14 +1,20 @@
--- ---
# roles
# linux # linux
- src: jnv.debian-backports roles:
- src: jnv.unattended-upgrades - src: jnv.debian-backports
- src: nickjj.docker - src: jnv.unattended-upgrades
- src: nickjj.fail2ban - src: nickjj.docker
- src: nickjj.fail2ban
# mac # mac
- src: elliotweiser.osx-command-line-tools - src: elliotweiser.osx-command-line-tools
- src: geerlingguy.homebrew - src: geerlingguy.homebrew
# misc # misc
- src: fubarhouse.golang - src: fubarhouse.golang
...
# collections
# linux
collections:
- community.docker

View File

@@ -6,7 +6,7 @@
include_role: include_role:
name: nickjj.docker name: nickjj.docker
- name: Ensure group "docker" exists - name: Ensure group "docker" existcs
group: group:
name: docker name: docker
state: present state: present
@@ -32,3 +32,19 @@
owner: root owner: root
group: root group: root
mode: u=rw,g=r,o=r mode: u=rw,g=r,o=r
- name: Run a demo Nginx container
tags: [docker]
block:
- name: Install Docker Python SDK
pip:
name: docker
- name: Run nginxdemos/nginx-hello
community.docker.docker_container:
name: nginx-hello
image: nginxdemos/nginx-hello
state: started
restart: yes
ports:
- 8080:8080

View File

@@ -22,7 +22,7 @@
creates: "{{ default_user_home }}/.local/bin/pipx" creates: "{{ default_user_home }}/.local/bin/pipx"
- name: Install pipx packages - name: Install pipx packages
shell: "{{ default_user_home }}/.local/bin/pipx install {{ item }} --force" shell: "{{ default_user_home }}/.local/bin/pipx install {{ item }} --force --include-deps"
loop: "{{ pipx_packages }}" loop: "{{ pipx_packages }}"
- name: Install Poetry - name: Install Poetry

View File

@@ -36,7 +36,6 @@
suffix: .tmp suffix: .tmp
register: temp_install_dir register: temp_install_dir
changed_when: false changed_when: false
tags: always
- name: Download oh-my-zsh - name: Download oh-my-zsh
get_url: get_url: