Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bootstrap.yaml
- ==============
- ---
- - hosts: '*'
- remote_user: root
- vars:
- root_password: "$1$MIs4WGHz$SYHl7IabC1SSY8scWGLrP0"
- tasks:
- - name: Set hostname
- copy: content="{{ inventory_hostname }}" dest=/etc/hostname
- - include: bootstrap/centos.yaml
- when: ansible_os_family == 'RedHat'
- - include: bootstrap/debian.yaml
- when: ansible_os_family == 'Debian'
- - name: Place laptop ssh key
- authorized_key: user=root key="{{ lookup('file', '/Users/yzguy/.ssh/id_rsa.pub') }}"
- - name: Set root password
- user: name=root password={{ root_password }}
- - name: Place authorized_keys
- authorized_key: user=root key="{{ item }}"
- with_file:
- - public_keys/jenkins
- bootstrap/centos.yaml
- =====================
- - name: Install epel-release repository
- yum: name=epel-release state=present
- - name: Install yum packages
- yum: name="{{ item }}" state=present
- with_items:
- - git
- - tmux
- - curl
- - wget
- - htop
- - vim-enhanced
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement