Saturday, March 26, 2022

InsufficientServicePermissions - Permissions granted to the object storage service principal to this bucket are insufficient

 In OCI, Object Storage, I am getting the below error when trying to create "Lifecycle Management Policy" using REST API.

{

    "code": "InsufficientServicePermissions",

    "message": "Permissions granted to the object storage service principal \"objectstorage-eu-frankfurt-1\" to this bucket are insufficient."

}

Fix the problem:

Create a policy and add the following

Allow group Administrators to read buckets in tenancy

Allow group Administrators to manage objects in tenancy where any {request.permission='OBJECT_CREATE', request.permission='OBJECT_INSPECT'}

Allow service objectstorage-ap-mumbai-1 to manage object-family in tenancy

 

Saturday, March 19, 2022

How to install and setup your Ansible

 We all know that, Ansible is a configuration management tool. Ansible is a simple IT automation tool.

Here in this blog post, I will teach you the very very basic of Ansible.

First of you, I prefer you to install ansible master/control node in your laptop or your workstation.

The installation is very straight forward.

yum install ansible or apt-get install ansible

Verify the version by ansible --version

Configuration file of ansible will be /etc/ansible/ansible.cfg

Let's add one server to your ansible.

Open the file /etc/ansible/hosts

Add the FQDN or IP of the server which you need to install some package to test and save the file.

Ansible works on SSH. Make sure that from your control node/master node you should able to ssh to the other server. If no, please use sshkey password less login.

ansible all -m ping
If you see a response similar to this, then all set you go to your first ansible playbook

aserver.example.org | SUCCESS => {
    "ansible_facts": {
        "discovered_interpreter_python": "/usr/bin/python"
    },
    "changed": false,
    "ping": "pong"
}