24 lines
537 B
YAML
24 lines
537 B
YAML
|
#!/usr/bin/ansible-playbook
|
||
|
# vim:ft=ansible:
|
||
|
---
|
||
|
- name: Install Cockpit-required packages via apt
|
||
|
apt:
|
||
|
name: "{{ packages }}"
|
||
|
vars:
|
||
|
packages:
|
||
|
- cockpit
|
||
|
become: true
|
||
|
- name: Copy Ansible private key
|
||
|
copy:
|
||
|
src: "{{ role_path }}/files/ansiblekey"
|
||
|
dest: ~/.ssh/id_rsa
|
||
|
mode: 0600
|
||
|
become: true
|
||
|
become_user: cockpit
|
||
|
- name: Add configs for all EC2 instances
|
||
|
# TODO: https://docs.ansible.com/ansible/latest/modules/template_module.html
|
||
|
debug:
|
||
|
msg: "{{ item }}"
|
||
|
with_inventory_hostnames:
|
||
|
- ec2
|