https://github.com/n1k0r/ansible-template
Ansible project template
https://github.com/n1k0r/ansible-template
administration ansible linux server ssh
Last synced: about 2 months ago
JSON representation
Ansible project template
- Host: GitHub
- URL: https://github.com/n1k0r/ansible-template
- Owner: n1k0r
- Created: 2024-04-01T10:06:12.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-04-01T10:06:21.000Z (about 2 years ago)
- Last Synced: 2025-03-01T06:44:40.604Z (over 1 year ago)
- Topics: administration, ansible, linux, server, ssh
- Language: Shell
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Ansible project template
> This "project" template has nothing to do with Ansible Tower "Projects".
## Usage
1. Copy these files to your project repository.
2. Initialize hosts with `initial.sh` script:
```sh
# using pubkey auth
./initial.sh root@1.2.3.4 all
# or using password auth
./initial.sh root@1.2.3.4 all password
```
3. Add hosts to inventory and change example variables.
4. Add `local.yml` to project root for any user from [inventory/group_vars/all/users.yml](inventory/group_vars/all/users.yml):
```yml
local:
user: username
password: abcdefgh
```
5. Install Ansible Galaxy dependencies if there are any:
```sh
ansible-galaxy install -r requirements.yml
```
6. Finish initialization by executing `setup.yml` playbook:
```sh
ansible-playbook setup.yml
```