philippfe / linux_workstation_configs

most commonly used configs for my linux-workstation
0 stars 0 forks source link

linux_workstation_configs

Ansible role to configure a linux workstation for cloud- and infrastructure-automation development. Currently only supporting (x)ubuntu

Requirements

You need ansible to be installed on your machine:

# sudo apt-get install -y ansible

Role Variables

set in defaults/main.yml:

install_atom_packages: false

if you want atom-packages to be installed, you have to overwrite this variable to be "true"

You also have to set variables for:

git_username:
git_mailaddress:

to be set in .gitconfig-file

Dependencies

You have to ensure that you execute ansible with the user you want to work later on as it will place config-files in the users home directory.

Be sure that the user is in sudoers group to be able to install packages.

Example Playbook

call this role with a site.yml looking like:

- import_playbook: linux_workstation_configs.yml

and linux_workstation_configs.yml with content (in this case we connect with a user and then use sudo):

- hosts: foo
  vars:
    git_mailaddress: <MAILADDRESS>
    git_username: <GIT_USERNAME>
  remote_user: <USER>
  roles:
    - linux_workstation_configs

using inventory file hosts.yml like:

foo:
  hosts:
    <IP>:

and this role in roles-directory, just by typing:

# ansible-playbook -i hosts linux_workstation_configs.yml --key-file "<private-ssh-key>"

other possibility is to just execute the playbook localy:

# ansible-playbook --connection=local --inventory 127.0.0.1, <PLAYBOOK>

Do not use remote_user variable in playbook in this case.

License

BSD

Author Information

Philipp Felwor