Skip to content

Commit 291686a

Browse files
Laure-dibene2k1
andauthored
Apply suggestions from code review
Co-authored-by: Benedikt Rollik <[email protected]>
1 parent 3016b4c commit 291686a

File tree

1 file changed

+18
-18
lines changed
  • tutorials/how-to-setup-applesilicon-server-with-terraform-ansible

1 file changed

+18
-18
lines changed

tutorials/how-to-setup-applesilicon-server-with-terraform-ansible/index.mdx

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -124,36 +124,36 @@ This will apply the new settings, ensuring that the server is launched within th
124124
pip install ansible
125125
```
126126

127-
2. Install Scaleway Ansible Collection: Scaleway provides an official Ansible collection that enables you to interact with Scaleway resources, such as creating servers. Install this collection using the ansible-galaxy command:
127+
2. Install Scaleway Ansible Collection: Scaleway provides an official Ansible collection that enables you to interact with Scaleway resources, such as creating servers. Install this collection using the `ansible-galaxy` command:
128128

129129
```shell
130130
ansible-galaxy collection install scaleway.scaleway
131131
```
132132

133-
3. Create a Directory: Now that you have Ansible and the Scaleway collection installed, create a directory for your Ansible project. This will help you keep everything organized.
133+
3. Create a directory: Now that you have Ansible and the Scaleway collection installed, create a directory for your Ansible project. This will help you keep everything organized.
134134

135-
Run the following commands to create and navigate into the project directory:
136-
137-
```shell
138-
mkdir apple_silicon_server_ansible
139-
cd apple_silicon_server_ansible
140-
```
135+
Run the following commands to create and navigate into the project directory:
136+
137+
```shell
138+
mkdir apple_silicon_server_ansible
139+
cd apple_silicon_server_ansible
140+
```
141141

142-
4. Create a Playbook: In Ansible, a playbook is a YAML file that defines the tasks to automate. Create a new file for your playbook, named create_applesilicon_server.yml:
142+
4. Create a playbook: In Ansible, a playbook is a YAML file that defines the tasks to automate. Create a new file for your playbook named `create_applesilicon_server.yml`:
143143

144144
```shell
145145
touch create_applesilicon_server.yml
146146
```
147147

148-
5. Define the Playbook Content: Open the create_applesilicon_server.yml file in your preferred text editor. Add the following content to define the task of provisioning an Apple Silicon server:
148+
5. Define the playbook content: Open the `create_applesilicon_server.yml` file in your preferred text editor. Add the following content to define the task of provisioning an Apple silicon server:
149149

150150
```ansible
151151
---
152-
- name: Create Apple Silicon Server on Scaleway
152+
- name: Create Apple silicon server on Scaleway
153153
hosts: localhost
154154
gather_facts: no
155155
tasks:
156-
- name: Create an Apple Silicon server
156+
- name: Create an Apple silicon server
157157
scaleway.scaleway.scaleway_applesilicon_server:
158158
access_key: "{{ scw_access_key }}"
159159
secret_key: "{{ scw_secret_key }}"
@@ -166,9 +166,9 @@ touch create_applesilicon_server.yml
166166
register: applesilicon_server
167167
```
168168

169-
6. Set Up Your Scaleway Credentials: Replace the placeholders {{ scw_access_key }}, {{ scw_secret_key }}, and {{ scw_project_id }} with your actual credentials. It’s a good practice to store these values in environment variables or an Ansible vault for added security. Alternatively, you can use a .env file or an external credentials file.
169+
6. Set up your Scaleway credentials: Replace the placeholders {{ scw_access_key }}, {{ scw_secret_key }}, and {{ scw_project_id }} with your actual credentials. It is a good practice to store these values in environment variables or an Ansible vault for added security. Alternatively, you can use a `.env` file or an external credentials file.
170170

171-
7. Run the Playbook: Now that your playbook is ready and your credentials are set, you can run the playbook to create your Apple Silicon server.
171+
7. Run the playbook: Now that your playbook is ready and your credentials are set, you can run the playbook to create your Apple silicon server.
172172

173173
Execute the following command:
174174

@@ -178,13 +178,13 @@ touch create_applesilicon_server.yml
178178

179179
Ansible will authenticate using your credentials, and the playbook will automatically provision the Apple Silicon server based on the defined parameters.
180180

181-
8. Check the Output: The playbook will output the details of the created server, including its ID, IP address, status, and other relevant information.
181+
8. Check the output: The playbook will output the details of the created server, including its ID, IP address, status, and other relevant information.
182182

183-
With these steps, you’ve successfully automated the creation of an Apple Silicon server on Scaleway using Ansible. You can now extend the playbook to configure your server or automate additional tasks as needed.
183+
With these steps, you have successfully automated the creation of an Apple silicon server on Scaleway using Ansible. You can now extend the playbook to configure your server or automate additional tasks as needed.
184184

185185
## How to read server info using Terraform
186186

187-
To read server information after creation, you can use the terraform output command, assuming you have defined output variables in your resources.tf. For example:
187+
To read server information after creation, you can use the terraform output command, assuming you have defined output variables in your `resources.tf`. For example:
188188

189189
```terraform
190190
#resources.tf
@@ -201,7 +201,7 @@ terraform output server_ip
201201

202202
## Conclusion
203203

204-
In this tutorial, we've explored how to automate the creation and management of Apple Silicon servers on Scaleway using two powerful tools: Terraform and Ansible. While both tools offer significant automation benefits, they each operate in distinct ways, which makes them suitable for different use cases.
204+
In this tutorial, we have explored how to automate the creation and management of Apple silicon servers on Scaleway using two powerful tools: Terraform and Ansible. While both tools offer significant automation benefits, they each operate in distinct ways, which makes them suitable for different use cases.
205205

206206
### Keys differences
207207

0 commit comments

Comments
 (0)