tpotce/cloud/ansible/openstack/roles/install/tasks/main.yaml

49 lines
1.2 KiB
YAML
Raw Normal View History

- name: Waiting for SSH connection
wait_for_connection:
2019-07-01 06:52:29 +00:00
- name: Gathering facts
setup:
2019-07-01 06:52:29 +00:00
- name: Cloning T-Pot install directory
git:
2020-09-04 13:01:21 +00:00
repo: "https://github.com/telekom-security/tpotce.git"
dest: /root/tpot
2020-03-21 23:50:24 +00:00
- name: Prepare to set user password
set_fact:
user_name: "{{ ansible_user }}"
2019-06-29 16:21:47 +00:00
user_salt: "s0mew1ck3dTpoT"
2019-10-21 14:40:19 +00:00
no_log: true
2019-10-21 14:12:08 +00:00
- name: Changing password for user {{ user_name }}
user:
name: "{{ ansible_user }}"
password: "{{ user_password | password_hash('sha512', user_salt) }}"
state: present
shell: /bin/bash
2019-07-01 06:52:29 +00:00
- name: Copy T-Pot configuration file
template:
2019-05-09 21:40:32 +00:00
src: ../../../../../../iso/installer/tpot.conf.dist
dest: /root/tpot.conf
owner: root
group: root
mode: 0644
2019-10-21 14:13:04 +00:00
- name: Install T-Pot on instance - be patient, this might take 15 to 30 minutes depending on the connection speed.
command: /root/tpot/iso/installer/install.sh --type=auto --conf=/root/tpot.conf
2019-07-01 06:52:29 +00:00
- name: Delete T-Pot configuration file
file:
path: /root/tpot.conf
state: absent
- name: Change unattended-upgrades to take default action
blockinfile:
dest: /etc/apt/apt.conf.d/50unattended-upgrades
block: |
Dpkg::Options {
"--force-confdef";
"--force-confold";
}