mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
First working Ansible playbook file set
This commit is contained in:
parent
5c6a3b7457
commit
6e5975dadc
@ -1,4 +1,5 @@
|
||||
---
|
||||
# Variables here are for all host groups
|
||||
# ansible/group_vars/all
|
||||
# Variables in this file are for *all* host groups (i.e. all hosts)
|
||||
|
||||
example_var: 23
|
@ -1,9 +1,9 @@
|
||||
---
|
||||
# This playbook deploys a BigchainDB node in one machine (one-m).
|
||||
|
||||
- name: deploy all software and configure it
|
||||
- name: install + configure + start all software
|
||||
hosts: all
|
||||
remote_user: root
|
||||
remote_user: ubuntu
|
||||
|
||||
roles:
|
||||
- common
|
@ -1,10 +1,9 @@
|
||||
---
|
||||
# This file should be in roles - common - handlers
|
||||
# Handler to handle common notifications. Handlers are called by other plays.
|
||||
# ansible/roles/common/handlers/main.yml
|
||||
# See http://docs.ansible.com/playbooks_intro.html for more information about handlers.
|
||||
|
||||
- name: restart ntp
|
||||
service: name=ntpd state=restarted
|
||||
|
||||
- name: restart iptables
|
||||
service: name=iptables state=restarted
|
||||
#- name: restart iptables
|
||||
# service: name=iptables state=restarted
|
@ -1,18 +1,24 @@
|
||||
---
|
||||
# ansible/roles/common/tasks/main.yml
|
||||
# Note: "become: true" basically means "become root user for this task" i.e. sudo <cmd>
|
||||
# See https://docs.ansible.com/ansible/become.html
|
||||
|
||||
- name: Do the equivalent of apt-get update
|
||||
- name: Do the equivalent of "sudo apt-get update"
|
||||
apt: update_cache=yes
|
||||
become: true
|
||||
|
||||
- name: Uninstall ntpdate (deprecated)
|
||||
apt: name=ntpdate state=absent
|
||||
become: true
|
||||
tags: ntp
|
||||
|
||||
- name: Update all installed packages to their latest versions
|
||||
apt: upgrade=dist
|
||||
become: true
|
||||
|
||||
- name: Install ntp
|
||||
apt: name=ntp state=latest update_cache=yes
|
||||
become: true
|
||||
tags: ntp
|
||||
|
||||
#- name: Configure ntp file
|
||||
@ -22,7 +28,8 @@
|
||||
# notify: restart ntp
|
||||
|
||||
- name: Start the ntp service
|
||||
service: name=ntpd state=started enabled=yes
|
||||
service: name=ntp state=started enabled=yes
|
||||
become: true
|
||||
tags: ntp
|
||||
|
||||
#- name: test to see if selinux is running
|
||||
|
Loading…
x
Reference in New Issue
Block a user